b=446534, Update canvas mochitests, code from Philip Taylor, patch by Eric Butler; r=vlad
authorVladimir Vukicevic <vladimir@pobox.com>
Sun, 10 Aug 2008 21:01:14 -0700
changeset 16546 c321f9d28355a35365ccccd4167a7d7225c0cf6b
parent 16545 ccc930630562e481b4caa0b71a059a137194be0d
child 16547 2598083b8f70b4276921ca0166ea641b6283ee33
push idunknown
push userunknown
push dateunknown
reviewersvlad
bugs446534
milestone1.9.1a2pre
b=446534, Update canvas mochitests, code from Philip Taylor, patch by Eric Butler; r=vlad
content/canvas/test/Makefile.in
content/canvas/test/image_anim-gr.gif
content/canvas/test/image_anim-gr.png
content/canvas/test/image_anim-poster-gr.png
content/canvas/test/image_rrgg-256x256.png
content/canvas/test/test_2d.canvas.readonly.html
content/canvas/test/test_2d.canvas.reference.html
content/canvas/test/test_2d.clearRect.basic.html
content/canvas/test/test_2d.clearRect.clip.html
content/canvas/test/test_2d.clearRect.globalalpha.html
content/canvas/test/test_2d.clearRect.globalcomposite.html
content/canvas/test/test_2d.clearRect.negative.html
content/canvas/test/test_2d.clearRect.nonfinite.html
content/canvas/test/test_2d.clearRect.path.html
content/canvas/test/test_2d.clearRect.shadow.html
content/canvas/test/test_2d.clearRect.transform.html
content/canvas/test/test_2d.clearRect.zero.html
content/canvas/test/test_2d.composite.canvas.copy.html
content/canvas/test/test_2d.composite.canvas.destination-atop.html
content/canvas/test/test_2d.composite.canvas.destination-in.html
content/canvas/test/test_2d.composite.canvas.destination-out.html
content/canvas/test/test_2d.composite.canvas.destination-over.html
content/canvas/test/test_2d.composite.canvas.lighter.html
content/canvas/test/test_2d.composite.canvas.source-atop.html
content/canvas/test/test_2d.composite.canvas.source-in.html
content/canvas/test/test_2d.composite.canvas.source-out.html
content/canvas/test/test_2d.composite.canvas.source-over.html
content/canvas/test/test_2d.composite.canvas.xor.html
content/canvas/test/test_2d.composite.clip.copy.html
content/canvas/test/test_2d.composite.clip.destination-atop.html
content/canvas/test/test_2d.composite.clip.destination-in.html
content/canvas/test/test_2d.composite.clip.destination-out.html
content/canvas/test/test_2d.composite.clip.destination-over.html
content/canvas/test/test_2d.composite.clip.lighter.html
content/canvas/test/test_2d.composite.clip.source-atop.html
content/canvas/test/test_2d.composite.clip.source-in.html
content/canvas/test/test_2d.composite.clip.source-out.html
content/canvas/test/test_2d.composite.clip.source-over.html
content/canvas/test/test_2d.composite.clip.xor.html
content/canvas/test/test_2d.composite.globalAlpha.canvas.html
content/canvas/test/test_2d.composite.globalAlpha.canvaspattern.html
content/canvas/test/test_2d.composite.globalAlpha.default.html
content/canvas/test/test_2d.composite.globalAlpha.fill.html
content/canvas/test/test_2d.composite.globalAlpha.image.html
content/canvas/test/test_2d.composite.globalAlpha.imagepattern.html
content/canvas/test/test_2d.composite.globalAlpha.invalid.html
content/canvas/test/test_2d.composite.globalAlpha.range.html
content/canvas/test/test_2d.composite.image.copy.html
content/canvas/test/test_2d.composite.image.destination-atop.html
content/canvas/test/test_2d.composite.image.destination-in.html
content/canvas/test/test_2d.composite.image.destination-out.html
content/canvas/test/test_2d.composite.image.destination-over.html
content/canvas/test/test_2d.composite.image.lighter.html
content/canvas/test/test_2d.composite.image.source-atop.html
content/canvas/test/test_2d.composite.image.source-in.html
content/canvas/test/test_2d.composite.image.source-out.html
content/canvas/test/test_2d.composite.image.source-over.html
content/canvas/test/test_2d.composite.image.xor.html
content/canvas/test/test_2d.composite.operation.casesensitive.html
content/canvas/test/test_2d.composite.operation.clear.html
content/canvas/test/test_2d.composite.operation.darker.html
content/canvas/test/test_2d.composite.operation.default.html
content/canvas/test/test_2d.composite.operation.get.html
content/canvas/test/test_2d.composite.operation.highlight.html
content/canvas/test/test_2d.composite.operation.nullsuffix.html
content/canvas/test/test_2d.composite.operation.over.html
content/canvas/test/test_2d.composite.operation.unrecognised.html
content/canvas/test/test_2d.composite.solid.copy.html
content/canvas/test/test_2d.composite.solid.destination-atop.html
content/canvas/test/test_2d.composite.solid.destination-in.html
content/canvas/test/test_2d.composite.solid.destination-out.html
content/canvas/test/test_2d.composite.solid.destination-over.html
content/canvas/test/test_2d.composite.solid.lighter.html
content/canvas/test/test_2d.composite.solid.source-atop.html
content/canvas/test/test_2d.composite.solid.source-in.html
content/canvas/test/test_2d.composite.solid.source-out.html
content/canvas/test/test_2d.composite.solid.source-over.html
content/canvas/test/test_2d.composite.solid.xor.html
content/canvas/test/test_2d.composite.transparent.copy.html
content/canvas/test/test_2d.composite.transparent.destination-atop.html
content/canvas/test/test_2d.composite.transparent.destination-in.html
content/canvas/test/test_2d.composite.transparent.destination-out.html
content/canvas/test/test_2d.composite.transparent.destination-over.html
content/canvas/test/test_2d.composite.transparent.lighter.html
content/canvas/test/test_2d.composite.transparent.source-atop.html
content/canvas/test/test_2d.composite.transparent.source-in.html
content/canvas/test/test_2d.composite.transparent.source-out.html
content/canvas/test/test_2d.composite.transparent.source-over.html
content/canvas/test/test_2d.composite.transparent.xor.html
content/canvas/test/test_2d.composite.uncovered.fill.copy.html
content/canvas/test/test_2d.composite.uncovered.fill.destination-atop.html
content/canvas/test/test_2d.composite.uncovered.fill.destination-in.html
content/canvas/test/test_2d.composite.uncovered.fill.source-in.html
content/canvas/test/test_2d.composite.uncovered.fill.source-out.html
content/canvas/test/test_2d.composite.uncovered.image.copy.html
content/canvas/test/test_2d.composite.uncovered.image.destination-atop.html
content/canvas/test/test_2d.composite.uncovered.image.destination-in.html
content/canvas/test/test_2d.composite.uncovered.image.source-in.html
content/canvas/test/test_2d.composite.uncovered.image.source-out.html
content/canvas/test/test_2d.composite.uncovered.pattern.copy.html
content/canvas/test/test_2d.composite.uncovered.pattern.destination-atop.html
content/canvas/test/test_2d.composite.uncovered.pattern.destination-in.html
content/canvas/test/test_2d.composite.uncovered.pattern.source-in.html
content/canvas/test/test_2d.composite.uncovered.pattern.source-out.html
content/canvas/test/test_2d.drawImage.3arg.html
content/canvas/test/test_2d.drawImage.5arg.html
content/canvas/test/test_2d.drawImage.9arg.basic.html
content/canvas/test/test_2d.drawImage.9arg.destpos.html
content/canvas/test/test_2d.drawImage.9arg.destsize.html
content/canvas/test/test_2d.drawImage.9arg.sourcepos.html
content/canvas/test/test_2d.drawImage.9arg.sourcesize.html
content/canvas/test/test_2d.drawImage.alpha.html
content/canvas/test/test_2d.drawImage.animated.apng.html
content/canvas/test/test_2d.drawImage.animated.gif.html
content/canvas/test/test_2d.drawImage.animated.poster.html
content/canvas/test/test_2d.drawImage.broken.html
content/canvas/test/test_2d.drawImage.canvas.html
content/canvas/test/test_2d.drawImage.clip.html
content/canvas/test/test_2d.drawImage.composite.html
content/canvas/test/test_2d.drawImage.floatsource.html
content/canvas/test/test_2d.drawImage.incomplete.html
content/canvas/test/test_2d.drawImage.negativedest.html
content/canvas/test/test_2d.drawImage.negativesource.html
content/canvas/test/test_2d.drawImage.nonfinite.html
content/canvas/test/test_2d.drawImage.nowrap.html
content/canvas/test/test_2d.drawImage.null.html
content/canvas/test/test_2d.drawImage.outsidesource.html
content/canvas/test/test_2d.drawImage.path.html
content/canvas/test/test_2d.drawImage.self.1.html
content/canvas/test/test_2d.drawImage.self.2.html
content/canvas/test/test_2d.drawImage.self.html
content/canvas/test/test_2d.drawImage.transform.html
content/canvas/test/test_2d.drawImage.wrongtype.html
content/canvas/test/test_2d.drawImage.zerosource.html
content/canvas/test/test_2d.fillRect.basic.html
content/canvas/test/test_2d.fillRect.clip.html
content/canvas/test/test_2d.fillRect.negative.html
content/canvas/test/test_2d.fillRect.nonfinite.html
content/canvas/test/test_2d.fillRect.path.html
content/canvas/test/test_2d.fillRect.shadow.html
content/canvas/test/test_2d.fillRect.transform.html
content/canvas/test/test_2d.fillRect.zero.html
content/canvas/test/test_2d.fillStyle.default.html
content/canvas/test/test_2d.fillStyle.get.semitransparent.html
content/canvas/test/test_2d.fillStyle.get.solid.html
content/canvas/test/test_2d.fillStyle.get.transparent.html
content/canvas/test/test_2d.fillStyle.invalidstring.html
content/canvas/test/test_2d.fillStyle.invalidtype.html
content/canvas/test/test_2d.fillStyle.parse.current.basic.html
content/canvas/test/test_2d.fillStyle.parse.current.changed.html
content/canvas/test/test_2d.fillStyle.parse.current.removed.html
content/canvas/test/test_2d.fillStyle.parse.flavor.html
content/canvas/test/test_2d.fillStyle.parse.hex3.html
content/canvas/test/test_2d.fillStyle.parse.hex6.html
content/canvas/test/test_2d.fillStyle.parse.hsl-1.html
content/canvas/test/test_2d.fillStyle.parse.hsl-2.html
content/canvas/test/test_2d.fillStyle.parse.hsl-3.html
content/canvas/test/test_2d.fillStyle.parse.hsl-4.html
content/canvas/test/test_2d.fillStyle.parse.hsl-5.html
content/canvas/test/test_2d.fillStyle.parse.hsl-clamp-1.html
content/canvas/test/test_2d.fillStyle.parse.hsl-clamp-2.html
content/canvas/test/test_2d.fillStyle.parse.hsl-clamp-3.html
content/canvas/test/test_2d.fillStyle.parse.hsl-clamp-4.html
content/canvas/test/test_2d.fillStyle.parse.hsla-1.html
content/canvas/test/test_2d.fillStyle.parse.hsla-2.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-1.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-2.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-3.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-4.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-5.html
content/canvas/test/test_2d.fillStyle.parse.hsla-clamp-6.html
content/canvas/test/test_2d.fillStyle.parse.html4.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hex3.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hex6.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsl-1.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsl-2.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsl-3.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsl-4.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsl-5.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsla-1.html
content/canvas/test/test_2d.fillStyle.parse.invalid.hsla-2.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-1.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-2.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-3.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-4.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-5.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-6.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgb-7.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgba-1.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgba-2.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgba-3.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgba-4.html
content/canvas/test/test_2d.fillStyle.parse.invalid.rgba-5.html
content/canvas/test/test_2d.fillStyle.parse.rgb-clamp-1.html
content/canvas/test/test_2d.fillStyle.parse.rgb-clamp-2.html
content/canvas/test/test_2d.fillStyle.parse.rgb-clamp-3.html
content/canvas/test/test_2d.fillStyle.parse.rgb-clamp-4.html
content/canvas/test/test_2d.fillStyle.parse.rgb-clamp-5.html
content/canvas/test/test_2d.fillStyle.parse.rgb-num.html
content/canvas/test/test_2d.fillStyle.parse.rgb-percent.html
content/canvas/test/test_2d.fillStyle.parse.rgba-clamp-1.html
content/canvas/test/test_2d.fillStyle.parse.rgba-clamp-2.html
content/canvas/test/test_2d.fillStyle.parse.rgba-num-1.html
content/canvas/test/test_2d.fillStyle.parse.rgba-num-2.html
content/canvas/test/test_2d.fillStyle.parse.rgba-percent.html
content/canvas/test/test_2d.fillStyle.parse.rgba-solid-1.html
content/canvas/test/test_2d.fillStyle.parse.rgba-solid-2.html
content/canvas/test/test_2d.fillStyle.parse.svg-1.html
content/canvas/test/test_2d.fillStyle.parse.svg-2.html
content/canvas/test/test_2d.fillStyle.parse.system.html
content/canvas/test/test_2d.fillStyle.parse.transparent-1.html
content/canvas/test/test_2d.fillStyle.parse.transparent-2.html
content/canvas/test/test_2d.getcontext.exists.html
content/canvas/test/test_2d.getcontext.shared.html
content/canvas/test/test_2d.getcontext.unique.html
content/canvas/test/test_2d.gradient.empty.html
content/canvas/test/test_2d.gradient.interpolate.alpha.html
content/canvas/test/test_2d.gradient.interpolate.colour.html
content/canvas/test/test_2d.gradient.interpolate.colouralpha.html
content/canvas/test/test_2d.gradient.interpolate.multiple.html
content/canvas/test/test_2d.gradient.interpolate.outside.html
content/canvas/test/test_2d.gradient.interpolate.overlap.html
content/canvas/test/test_2d.gradient.interpolate.overlap2.html
content/canvas/test/test_2d.gradient.interpolate.solid.html
content/canvas/test/test_2d.gradient.interpolate.vertical.html
content/canvas/test/test_2d.gradient.interpolate.zerosize.html
content/canvas/test/test_2d.gradient.linear.nonfinite.html
content/canvas/test/test_2d.gradient.linear.transform.1.html
content/canvas/test/test_2d.gradient.linear.transform.2.html
content/canvas/test/test_2d.gradient.linear.transform.3.html
content/canvas/test/test_2d.gradient.object.compare.html
content/canvas/test/test_2d.gradient.object.crosscanvas.html
content/canvas/test/test_2d.gradient.object.invalidcolour.html
content/canvas/test/test_2d.gradient.object.invalidoffset.html
content/canvas/test/test_2d.gradient.object.return.html
content/canvas/test/test_2d.gradient.object.type.html
content/canvas/test/test_2d.gradient.object.update.html
content/canvas/test/test_2d.gradient.radial.cone.behind.html
content/canvas/test/test_2d.gradient.radial.cone.beside.html
content/canvas/test/test_2d.gradient.radial.cone.bottom.html
content/canvas/test/test_2d.gradient.radial.cone.cylinder.html
content/canvas/test/test_2d.gradient.radial.cone.front.html
content/canvas/test/test_2d.gradient.radial.cone.shape1.html
content/canvas/test/test_2d.gradient.radial.cone.shape2.html
content/canvas/test/test_2d.gradient.radial.cone.top.html
content/canvas/test/test_2d.gradient.radial.equal.html
content/canvas/test/test_2d.gradient.radial.inside1.html
content/canvas/test/test_2d.gradient.radial.inside2.html
content/canvas/test/test_2d.gradient.radial.inside3.html
content/canvas/test/test_2d.gradient.radial.invalid.html
content/canvas/test/test_2d.gradient.radial.negative.html
content/canvas/test/test_2d.gradient.radial.nonfinite.html
content/canvas/test/test_2d.gradient.radial.outside1.html
content/canvas/test/test_2d.gradient.radial.outside2.html
content/canvas/test/test_2d.gradient.radial.outside3.html
content/canvas/test/test_2d.gradient.radial.touch1.html
content/canvas/test/test_2d.gradient.radial.touch2.html
content/canvas/test/test_2d.gradient.radial.touch3.html
content/canvas/test/test_2d.gradient.radial.transform.1.html
content/canvas/test/test_2d.gradient.radial.transform.2.html
content/canvas/test/test_2d.gradient.radial.transform.3.html
content/canvas/test/test_2d.imageData.create.basic.html
content/canvas/test/test_2d.imageData.create.initial.html
content/canvas/test/test_2d.imageData.create.large.html
content/canvas/test/test_2d.imageData.create.negative.html
content/canvas/test/test_2d.imageData.create.nonfinite.html
content/canvas/test/test_2d.imageData.create.round.html
content/canvas/test/test_2d.imageData.create.tiny.html
content/canvas/test/test_2d.imageData.create.type.html
content/canvas/test/test_2d.imageData.create.zero.html
content/canvas/test/test_2d.imageData.get.basic.html
content/canvas/test/test_2d.imageData.get.clamp.html
content/canvas/test/test_2d.imageData.get.nonfinite.html
content/canvas/test/test_2d.imageData.get.nonpositive.html
content/canvas/test/test_2d.imageData.get.nonpremul.html
content/canvas/test/test_2d.imageData.get.order.alpha.html
content/canvas/test/test_2d.imageData.get.order.cols.html
content/canvas/test/test_2d.imageData.get.order.rgb.html
content/canvas/test/test_2d.imageData.get.order.rows.html
content/canvas/test/test_2d.imageData.get.properties.html
content/canvas/test/test_2d.imageData.get.range.html
content/canvas/test/test_2d.imageData.get.smallest.html
content/canvas/test/test_2d.imageData.get.source.negative.html
content/canvas/test/test_2d.imageData.get.source.outside.html
content/canvas/test/test_2d.imageData.get.source.size.html
content/canvas/test/test_2d.imageData.get.sourcepos.html
content/canvas/test/test_2d.imageData.get.sourcesize.html
content/canvas/test/test_2d.imageData.get.tiny.html
content/canvas/test/test_2d.imageData.get.type.html
content/canvas/test/test_2d.imageData.get.unaffected.html
content/canvas/test/test_2d.imageData.get.values.html
content/canvas/test/test_2d.imageData.get.zero.html
content/canvas/test/test_2d.imageData.object.clamp.html
content/canvas/test/test_2d.imageData.object.ctor.html
content/canvas/test/test_2d.imageData.object.nan.html
content/canvas/test/test_2d.imageData.object.properties.html
content/canvas/test/test_2d.imageData.object.readonly.html
content/canvas/test/test_2d.imageData.object.round.html
content/canvas/test/test_2d.imageData.object.set.html
content/canvas/test/test_2d.imageData.object.string.html
content/canvas/test/test_2d.imageData.object.undefined.html
content/canvas/test/test_2d.imageData.put.alpha.html
content/canvas/test/test_2d.imageData.put.basic.html
content/canvas/test/test_2d.imageData.put.clip.html
content/canvas/test/test_2d.imageData.put.created.html
content/canvas/test/test_2d.imageData.put.cross.html
content/canvas/test/test_2d.imageData.put.dirty.negative.html
content/canvas/test/test_2d.imageData.put.dirty.outside.html
content/canvas/test/test_2d.imageData.put.dirty.rect1.html
content/canvas/test/test_2d.imageData.put.dirty.rect2.html
content/canvas/test/test_2d.imageData.put.dirty.zero.html
content/canvas/test/test_2d.imageData.put.modified.html
content/canvas/test/test_2d.imageData.put.nonfinite.html
content/canvas/test/test_2d.imageData.put.null.html
content/canvas/test/test_2d.imageData.put.path.html
content/canvas/test/test_2d.imageData.put.type.correct.html
content/canvas/test/test_2d.imageData.put.type.extra.html
content/canvas/test/test_2d.imageData.put.type.invalidsize.html
content/canvas/test/test_2d.imageData.put.type.invalidvalues.html
content/canvas/test/test_2d.imageData.put.type.missing.html
content/canvas/test/test_2d.imageData.put.type.onepixel.html
content/canvas/test/test_2d.imageData.put.unaffected.html
content/canvas/test/test_2d.imageData.put.unchanged.html
content/canvas/test/test_2d.imageData.put.wrongtype.html
content/canvas/test/test_2d.line.cap.butt.html
content/canvas/test/test_2d.line.cap.closed.html
content/canvas/test/test_2d.line.cap.invalid.html
content/canvas/test/test_2d.line.cap.open.html
content/canvas/test/test_2d.line.cap.round.html
content/canvas/test/test_2d.line.cap.square.html
content/canvas/test/test_2d.line.cap.zerobezier.round.html
content/canvas/test/test_2d.line.cap.zeroline.round.html
content/canvas/test/test_2d.line.cap.zeroline.square.html
content/canvas/test/test_2d.line.cross.html
content/canvas/test/test_2d.line.defaults.html
content/canvas/test/test_2d.line.invalid.lineWidth.html
content/canvas/test/test_2d.line.invalid.miterLimit.html
content/canvas/test/test_2d.line.join.bevel.html
content/canvas/test/test_2d.line.join.closed.html
content/canvas/test/test_2d.line.join.invalid.html
content/canvas/test/test_2d.line.join.miter.html
content/canvas/test/test_2d.line.join.open.html
content/canvas/test/test_2d.line.join.parallel.html
content/canvas/test/test_2d.line.join.round.html
content/canvas/test/test_2d.line.join.zeroline.corner.html
content/canvas/test/test_2d.line.join.zeroline.join.html
content/canvas/test/test_2d.line.lineCap.butt.html
content/canvas/test/test_2d.line.lineCap.round.html
content/canvas/test/test_2d.line.lineCap.square.html
content/canvas/test/test_2d.line.lineJoin.bevel.html
content/canvas/test/test_2d.line.lineJoin.miter.html
content/canvas/test/test_2d.line.lineJoin.round.html
content/canvas/test/test_2d.line.lineWidth.basic.html
content/canvas/test/test_2d.line.lineWidth.transformed.html
content/canvas/test/test_2d.line.miter.acute.html
content/canvas/test/test_2d.line.miter.exceeded.html
content/canvas/test/test_2d.line.miter.invalid.html
content/canvas/test/test_2d.line.miter.lineedge.html
content/canvas/test/test_2d.line.miter.obtuse.html
content/canvas/test/test_2d.line.miter.rightangle.html
content/canvas/test/test_2d.line.miter.within.html
content/canvas/test/test_2d.line.union.html
content/canvas/test/test_2d.line.width.basic.html
content/canvas/test/test_2d.line.width.invalid.html
content/canvas/test/test_2d.line.width.transformed.html
content/canvas/test/test_2d.missingargs.html
content/canvas/test/test_2d.path.arc.angle.1.html
content/canvas/test/test_2d.path.arc.angle.2.html
content/canvas/test/test_2d.path.arc.angle.3.html
content/canvas/test/test_2d.path.arc.angle.4.html
content/canvas/test/test_2d.path.arc.angle.5.html
content/canvas/test/test_2d.path.arc.angle.6.html
content/canvas/test/test_2d.path.arc.empty.html
content/canvas/test/test_2d.path.arc.end.html
content/canvas/test/test_2d.path.arc.negative.html
content/canvas/test/test_2d.path.arc.nonempty.html
content/canvas/test/test_2d.path.arc.nonfinite.html
content/canvas/test/test_2d.path.arc.scale.1.html
content/canvas/test/test_2d.path.arc.scale.2.html
content/canvas/test/test_2d.path.arc.selfintersect.1.html
content/canvas/test/test_2d.path.arc.selfintersect.2.html
content/canvas/test/test_2d.path.arc.shape.1.html
content/canvas/test/test_2d.path.arc.shape.2.html
content/canvas/test/test_2d.path.arc.shape.3.html
content/canvas/test/test_2d.path.arc.shape.4.html
content/canvas/test/test_2d.path.arc.shape.5.html
content/canvas/test/test_2d.path.arc.twopie.1.html
content/canvas/test/test_2d.path.arc.twopie.2.html
content/canvas/test/test_2d.path.arc.twopie.3.html
content/canvas/test/test_2d.path.arc.twopie.4.html
content/canvas/test/test_2d.path.arc.zero.1.html
content/canvas/test/test_2d.path.arc.zero.2.html
content/canvas/test/test_2d.path.arc.zero.3.html
content/canvas/test/test_2d.path.arc.zero.4.html
content/canvas/test/test_2d.path.arc.zero.5.html
content/canvas/test/test_2d.path.arc.zero.6.html
content/canvas/test/test_2d.path.arc.zero.html
content/canvas/test/test_2d.path.arc.zeroradius.html
content/canvas/test/test_2d.path.arcTo.coincide.1.html
content/canvas/test/test_2d.path.arcTo.coincide.2.html
content/canvas/test/test_2d.path.arcTo.collinear.1.html
content/canvas/test/test_2d.path.arcTo.collinear.2.html
content/canvas/test/test_2d.path.arcTo.collinear.3.html
content/canvas/test/test_2d.path.arcTo.emptysubpath.html
content/canvas/test/test_2d.path.arcTo.negative.html
content/canvas/test/test_2d.path.arcTo.nonfinite.html
content/canvas/test/test_2d.path.arcTo.scale.html
content/canvas/test/test_2d.path.arcTo.shape.curve1.html
content/canvas/test/test_2d.path.arcTo.shape.curve2.html
content/canvas/test/test_2d.path.arcTo.shape.end.html
content/canvas/test/test_2d.path.arcTo.shape.start.html
content/canvas/test/test_2d.path.arcTo.transformation.html
content/canvas/test/test_2d.path.arcTo.zero.1.html
content/canvas/test/test_2d.path.arcTo.zero.2.html
content/canvas/test/test_2d.path.beginPath.html
content/canvas/test/test_2d.path.bezierCurveTo.basic.html
content/canvas/test/test_2d.path.bezierCurveTo.emptysubpath.html
content/canvas/test/test_2d.path.bezierCurveTo.nonfinite.html
content/canvas/test/test_2d.path.bezierCurveTo.scaled.html
content/canvas/test/test_2d.path.bezierCurveTo.shape.html
content/canvas/test/test_2d.path.clip.basic.1.html
content/canvas/test/test_2d.path.clip.basic.2.html
content/canvas/test/test_2d.path.clip.empty.html
content/canvas/test/test_2d.path.clip.intersect.html
content/canvas/test/test_2d.path.clip.unaffected.html
content/canvas/test/test_2d.path.clip.winding.1.html
content/canvas/test/test_2d.path.clip.winding.2.html
content/canvas/test/test_2d.path.closePath.empty.html
content/canvas/test/test_2d.path.closePath.newline.html
content/canvas/test/test_2d.path.closePath.nextpoint.html
content/canvas/test/test_2d.path.fill.closed.basic.html
content/canvas/test/test_2d.path.fill.closed.unaffected.html
content/canvas/test/test_2d.path.fill.overlap.html
content/canvas/test/test_2d.path.fill.winding.add.html
content/canvas/test/test_2d.path.fill.winding.subtract.1.html
content/canvas/test/test_2d.path.fill.winding.subtract.2.html
content/canvas/test/test_2d.path.fill.winding.subtract.3.html
content/canvas/test/test_2d.path.initial.html
content/canvas/test/test_2d.path.isPointInPath.arc.html
content/canvas/test/test_2d.path.isPointInPath.basic.1.html
content/canvas/test/test_2d.path.isPointInPath.basic.2.html
content/canvas/test/test_2d.path.isPointInPath.bezier.html
content/canvas/test/test_2d.path.isPointInPath.bigarc.html
content/canvas/test/test_2d.path.isPointInPath.edge.html
content/canvas/test/test_2d.path.isPointInPath.empty.html
content/canvas/test/test_2d.path.isPointInPath.nonfinite.html
content/canvas/test/test_2d.path.isPointInPath.outside.html
content/canvas/test/test_2d.path.isPointInPath.subpath.html
content/canvas/test/test_2d.path.isPointInPath.transform.1.html
content/canvas/test/test_2d.path.isPointInPath.transform.2.html
content/canvas/test/test_2d.path.isPointInPath.transform.3.html
content/canvas/test/test_2d.path.isPointInPath.unclosed.html
content/canvas/test/test_2d.path.isPointInPath.winding.html
content/canvas/test/test_2d.path.lineTo.basic.html
content/canvas/test/test_2d.path.lineTo.emptysubpath.html
content/canvas/test/test_2d.path.lineTo.nextpoint.html
content/canvas/test/test_2d.path.lineTo.nonfinite.html
content/canvas/test/test_2d.path.moveTo.basic.html
content/canvas/test/test_2d.path.moveTo.multiple.html
content/canvas/test/test_2d.path.moveTo.newsubpath.html
content/canvas/test/test_2d.path.moveTo.nonfinite.html
content/canvas/test/test_2d.path.quadraticCurveTo.basic.html
content/canvas/test/test_2d.path.quadraticCurveTo.emptysubpath.html
content/canvas/test/test_2d.path.quadraticCurveTo.nonfinite.html
content/canvas/test/test_2d.path.quadraticCurveTo.scaled.html
content/canvas/test/test_2d.path.quadraticCurveTo.shape.html
content/canvas/test/test_2d.path.rect.basic.html
content/canvas/test/test_2d.path.rect.closed.html
content/canvas/test/test_2d.path.rect.end.1.html
content/canvas/test/test_2d.path.rect.end.2.html
content/canvas/test/test_2d.path.rect.negative.html
content/canvas/test/test_2d.path.rect.newsubpath.html
content/canvas/test/test_2d.path.rect.nonfinite.html
content/canvas/test/test_2d.path.rect.selfintersect.html
content/canvas/test/test_2d.path.rect.winding.html
content/canvas/test/test_2d.path.rect.zero.1.html
content/canvas/test/test_2d.path.rect.zero.2.html
content/canvas/test/test_2d.path.rect.zero.3.html
content/canvas/test/test_2d.path.rect.zero.4.html
content/canvas/test/test_2d.path.rect.zero.5.html
content/canvas/test/test_2d.path.rect.zero.6.html
content/canvas/test/test_2d.path.stroke.empty.html
content/canvas/test/test_2d.path.stroke.overlap.html
content/canvas/test/test_2d.path.stroke.prune.arc.html
content/canvas/test/test_2d.path.stroke.prune.closed.html
content/canvas/test/test_2d.path.stroke.prune.corner.html
content/canvas/test/test_2d.path.stroke.prune.curve.html
content/canvas/test/test_2d.path.stroke.prune.line.html
content/canvas/test/test_2d.path.stroke.prune.rect.html
content/canvas/test/test_2d.path.stroke.scale1.html
content/canvas/test/test_2d.path.stroke.scale2.html
content/canvas/test/test_2d.path.stroke.skew.html
content/canvas/test/test_2d.path.stroke.unaffected.html
content/canvas/test/test_2d.path.stroke.union.html
content/canvas/test/test_2d.path.transformation.basic.html
content/canvas/test/test_2d.path.transformation.changing.html
content/canvas/test/test_2d.path.transformation.multiple.1.html
content/canvas/test/test_2d.path.transformation.multiple.2.html
content/canvas/test/test_2d.path.transformation.multiple.3.html
content/canvas/test/test_2d.path.transformation.multiple.html
content/canvas/test/test_2d.pattern.animated.gif.html
content/canvas/test/test_2d.pattern.basic.canvas.html
content/canvas/test/test_2d.pattern.basic.image.html
content/canvas/test/test_2d.pattern.basic.nocontext.html
content/canvas/test/test_2d.pattern.basic.type.html
content/canvas/test/test_2d.pattern.basic.zerocanvas.html
content/canvas/test/test_2d.pattern.crosscanvas.html
content/canvas/test/test_2d.pattern.image.broken.html
content/canvas/test/test_2d.pattern.image.incomplete.html
content/canvas/test/test_2d.pattern.image.null.html
content/canvas/test/test_2d.pattern.image.string.html
content/canvas/test/test_2d.pattern.image.undefined.html
content/canvas/test/test_2d.pattern.modify.canvas1.html
content/canvas/test/test_2d.pattern.modify.canvas2.html
content/canvas/test/test_2d.pattern.modify.image1.html
content/canvas/test/test_2d.pattern.modify.image2.html
content/canvas/test/test_2d.pattern.paint.coord3.html
content/canvas/test/test_2d.pattern.paint.norepeat.basic.html
content/canvas/test/test_2d.pattern.paint.norepeat.coord1.html
content/canvas/test/test_2d.pattern.paint.norepeat.coord2.html
content/canvas/test/test_2d.pattern.paint.norepeat.coord3.html
content/canvas/test/test_2d.pattern.paint.norepeat.outside.html
content/canvas/test/test_2d.pattern.paint.orientation.canvas.html
content/canvas/test/test_2d.pattern.paint.orientation.image.html
content/canvas/test/test_2d.pattern.paint.repeat.basic.html
content/canvas/test/test_2d.pattern.paint.repeat.coord1.html
content/canvas/test/test_2d.pattern.paint.repeat.coord2.html
content/canvas/test/test_2d.pattern.paint.repeat.coord3.html
content/canvas/test/test_2d.pattern.paint.repeat.outside.html
content/canvas/test/test_2d.pattern.paint.repeatx.basic.html
content/canvas/test/test_2d.pattern.paint.repeatx.coord1.html
content/canvas/test/test_2d.pattern.paint.repeatx.outside.html
content/canvas/test/test_2d.pattern.paint.repeaty.basic.html
content/canvas/test/test_2d.pattern.paint.repeaty.coord1.html
content/canvas/test/test_2d.pattern.paint.repeaty.outside.html
content/canvas/test/test_2d.pattern.repeat.case.html
content/canvas/test/test_2d.pattern.repeat.empty.html
content/canvas/test/test_2d.pattern.repeat.missing.html
content/canvas/test/test_2d.pattern.repeat.null.html
content/canvas/test/test_2d.pattern.repeat.nullsuffix.html
content/canvas/test/test_2d.pattern.repeat.undefined.html
content/canvas/test/test_2d.pattern.repeat.unrecognised.html
content/canvas/test/test_2d.scaled.html
content/canvas/test/test_2d.shadow.alpha.1.html
content/canvas/test/test_2d.shadow.alpha.2.html
content/canvas/test/test_2d.shadow.alpha.3.html
content/canvas/test/test_2d.shadow.alpha.4.html
content/canvas/test/test_2d.shadow.alpha.5.html
content/canvas/test/test_2d.shadow.attributes.shadowBlur.1.html
content/canvas/test/test_2d.shadow.attributes.shadowBlur.2.html
content/canvas/test/test_2d.shadow.attributes.shadowColor.1.html
content/canvas/test/test_2d.shadow.attributes.shadowColor.2.html
content/canvas/test/test_2d.shadow.attributes.shadowOffset.1.html
content/canvas/test/test_2d.shadow.attributes.shadowOffset.2.html
content/canvas/test/test_2d.shadow.basic.1.html
content/canvas/test/test_2d.shadow.basic.2.html
content/canvas/test/test_2d.shadow.blur.high.html
content/canvas/test/test_2d.shadow.blur.low.html
content/canvas/test/test_2d.shadow.canvas.alpha.html
content/canvas/test/test_2d.shadow.canvas.basic.html
content/canvas/test/test_2d.shadow.canvas.transparent.1.html
content/canvas/test/test_2d.shadow.canvas.transparent.2.html
content/canvas/test/test_2d.shadow.clip.1.html
content/canvas/test/test_2d.shadow.clip.2.html
content/canvas/test/test_2d.shadow.clip.3.html
content/canvas/test/test_2d.shadow.composite.1.html
content/canvas/test/test_2d.shadow.composite.2.html
content/canvas/test/test_2d.shadow.composite.3.html
content/canvas/test/test_2d.shadow.composite.4.html
content/canvas/test/test_2d.shadow.gradient.alpha.html
content/canvas/test/test_2d.shadow.gradient.basic.html
content/canvas/test/test_2d.shadow.gradient.transparent.1.html
content/canvas/test/test_2d.shadow.gradient.transparent.2.html
content/canvas/test/test_2d.shadow.image.alpha.html
content/canvas/test/test_2d.shadow.image.basic.html
content/canvas/test/test_2d.shadow.image.scale.html
content/canvas/test/test_2d.shadow.image.section.html
content/canvas/test/test_2d.shadow.image.transparent.1.html
content/canvas/test/test_2d.shadow.image.transparent.2.html
content/canvas/test/test_2d.shadow.offset.negativeX.html
content/canvas/test/test_2d.shadow.offset.negativeY.html
content/canvas/test/test_2d.shadow.offset.positiveX.html
content/canvas/test/test_2d.shadow.offset.positiveY.html
content/canvas/test/test_2d.shadow.outside.html
content/canvas/test/test_2d.shadow.pattern.alpha.html
content/canvas/test/test_2d.shadow.pattern.basic.html
content/canvas/test/test_2d.shadow.pattern.transparent.1.html
content/canvas/test/test_2d.shadow.pattern.transparent.2.html
content/canvas/test/test_2d.shadow.stroke.basic.html
content/canvas/test/test_2d.shadow.stroke.cap.1.html
content/canvas/test/test_2d.shadow.stroke.cap.2.html
content/canvas/test/test_2d.shadow.stroke.join.1.html
content/canvas/test/test_2d.shadow.stroke.join.2.html
content/canvas/test/test_2d.shadow.stroke.join.3.html
content/canvas/test/test_2d.shadow.transform.1.html
content/canvas/test/test_2d.shadow.transform.2.html
content/canvas/test/test_2d.state.saverestore.bitmap.html
content/canvas/test/test_2d.state.saverestore.clip.html
content/canvas/test/test_2d.state.saverestore.fillStyle.html
content/canvas/test/test_2d.state.saverestore.globalAlpha.html
content/canvas/test/test_2d.state.saverestore.globalCompositeOperation.html
content/canvas/test/test_2d.state.saverestore.lineCap.html
content/canvas/test/test_2d.state.saverestore.lineJoin.html
content/canvas/test/test_2d.state.saverestore.lineWidth.html
content/canvas/test/test_2d.state.saverestore.miterLimit.html
content/canvas/test/test_2d.state.saverestore.path.html
content/canvas/test/test_2d.state.saverestore.shadowBlur.html
content/canvas/test/test_2d.state.saverestore.shadowColor.html
content/canvas/test/test_2d.state.saverestore.shadowOffsetX.html
content/canvas/test/test_2d.state.saverestore.shadowOffsetY.html
content/canvas/test/test_2d.state.saverestore.stack.html
content/canvas/test/test_2d.state.saverestore.stackdepth.html
content/canvas/test/test_2d.state.saverestore.strokeStyle.html
content/canvas/test/test_2d.state.saverestore.transformation.html
content/canvas/test/test_2d.state.saverestore.underflow.html
content/canvas/test/test_2d.strokeRect.basic.html
content/canvas/test/test_2d.strokeRect.clip.html
content/canvas/test/test_2d.strokeRect.globalalpha.html
content/canvas/test/test_2d.strokeRect.globalcomposite.html
content/canvas/test/test_2d.strokeRect.negative.html
content/canvas/test/test_2d.strokeRect.nonfinite.html
content/canvas/test/test_2d.strokeRect.path.html
content/canvas/test/test_2d.strokeRect.shadow.html
content/canvas/test/test_2d.strokeRect.transform.html
content/canvas/test/test_2d.strokeRect.zero.1.html
content/canvas/test/test_2d.strokeRect.zero.2.html
content/canvas/test/test_2d.strokeRect.zero.3.html
content/canvas/test/test_2d.strokeRect.zero.4.html
content/canvas/test/test_2d.strokeRect.zero.5.html
content/canvas/test/test_2d.strokeStyle.default.html
content/canvas/test/test_2d.transformation.order.html
content/canvas/test/test_2d.transformation.rotate.direction.html
content/canvas/test/test_2d.transformation.rotate.infinity.html
content/canvas/test/test_2d.transformation.rotate.nan.html
content/canvas/test/test_2d.transformation.rotate.neginfinity.html
content/canvas/test/test_2d.transformation.rotate.nonfinite.html
content/canvas/test/test_2d.transformation.rotate.radians.html
content/canvas/test/test_2d.transformation.rotate.wrap.html
content/canvas/test/test_2d.transformation.rotate.wrapnegative.html
content/canvas/test/test_2d.transformation.rotate.zero.html
content/canvas/test/test_2d.transformation.scale.basic.html
content/canvas/test/test_2d.transformation.scale.large.html
content/canvas/test/test_2d.transformation.scale.multiple.html
content/canvas/test/test_2d.transformation.scale.negative.html
content/canvas/test/test_2d.transformation.scale.nonfinite.html
content/canvas/test/test_2d.transformation.scale.zero.html
content/canvas/test/test_2d.transformation.setTransform.multiple.html
content/canvas/test/test_2d.transformation.setTransform.nonfinite.html
content/canvas/test/test_2d.transformation.setTransform.skewed.html
content/canvas/test/test_2d.transformation.transform.identity.html
content/canvas/test/test_2d.transformation.transform.multiply.html
content/canvas/test/test_2d.transformation.transform.nonfinite.html
content/canvas/test/test_2d.transformation.transform.skewed.html
content/canvas/test/test_2d.transformation.translate.basic.html
content/canvas/test/test_2d.transformation.translate.nonfinite.html
content/canvas/test/test_2d.type.delete.html
content/canvas/test/test_2d.type.exists.html
content/canvas/test/test_2d.type.extend.html
content/canvas/test/test_2d.type.name.html
content/canvas/test/test_2d.type.prototype.html
content/canvas/test/test_2d.type.replace.html
content/canvas/test/test_2d.voidreturn.html
content/canvas/test/test_context.arguments.extra.html
content/canvas/test/test_context.arguments.missing.html
content/canvas/test/test_context.casesensitive.html
content/canvas/test/test_context.emptystring.html
content/canvas/test/test_context.unrecognised.badname.html
content/canvas/test/test_context.unrecognised.badsuffix.html
content/canvas/test/test_context.unrecognised.nullsuffix.html
content/canvas/test/test_context.unrecognised.unicode.html
content/canvas/test/test_fallback.basic.html
content/canvas/test/test_fallback.multiple.html
content/canvas/test/test_fallback.nested.html
content/canvas/test/test_initial.colour.html
content/canvas/test/test_initial.reset.2dstate.html
content/canvas/test/test_initial.reset.clip.html
content/canvas/test/test_initial.reset.different.html
content/canvas/test/test_initial.reset.gradient.html
content/canvas/test/test_initial.reset.path.html
content/canvas/test/test_initial.reset.pattern.html
content/canvas/test/test_initial.reset.same.html
content/canvas/test/test_initial.reset.transform.html
content/canvas/test/test_size.attributes.default.html
content/canvas/test/test_size.attributes.html
content/canvas/test/test_size.attributes.parse.badsuffix.html
content/canvas/test/test_size.attributes.parse.floatsuffix.html
content/canvas/test/test_size.attributes.parse.negative.html
content/canvas/test/test_size.attributes.parse.nonnumber.html
content/canvas/test/test_size.attributes.parse.percentsuffix.html
content/canvas/test/test_size.attributes.parse.whitespace.html
content/canvas/test/test_size.attributes.parse.zero.html
content/canvas/test/test_size.attributes.parse.zerosuffix.html
content/canvas/test/test_size.attributes.reflect.1.html
content/canvas/test/test_size.attributes.reflect.2.html
content/canvas/test/test_size.attributes.removed.html
content/canvas/test/test_size.attributes.setAttribute.badsuffix.html
content/canvas/test/test_size.attributes.setAttribute.floatsuffix.html
content/canvas/test/test_size.attributes.setAttribute.negative.html
content/canvas/test/test_size.attributes.setAttribute.nonnumber.html
content/canvas/test/test_size.attributes.setAttribute.percentsuffix.html
content/canvas/test/test_size.attributes.setAttribute.whitespace.html
content/canvas/test/test_size.attributes.setAttribute.zero.html
content/canvas/test/test_size.attributes.setAttribute.zerosuffix.html
content/canvas/test/test_size.attributes.style.html
content/canvas/test/test_size.attributes.type.get.html
content/canvas/test/test_size.attributes.type.set.html
content/canvas/test/test_toDataURL.arguments.1.html
content/canvas/test/test_toDataURL.arguments.2.html
content/canvas/test/test_toDataURL.arguments.3.html
content/canvas/test/test_toDataURL.complexcolours.html
content/canvas/test/test_toDataURL.default.html
content/canvas/test/test_toDataURL.lowercase.html
content/canvas/test/test_toDataURL.nocontext.html
content/canvas/test/test_toDataURL.png.html
content/canvas/test/test_toDataURL.primarycolours.html
content/canvas/test/test_toDataURL.unrecognised.html
content/canvas/test/test_toDataURL.zerosize.html
content/canvas/test/test_type.delete.html
content/canvas/test/test_type.exists.html
content/canvas/test/test_type.extend.html
content/canvas/test/test_type.name.html
content/canvas/test/test_type.prototype.html
content/canvas/test/test_type.replace.html
--- a/content/canvas/test/Makefile.in
+++ b/content/canvas/test/Makefile.in
@@ -39,18 +39,17 @@
 DEPTH		= ../../..
 topsrcdir	= @top_srcdir@
 srcdir		= @srcdir@
 VPATH		= @srcdir@
 relativesrcdir  = content/canvas/test
 
 include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
-
-_TEST_FILES_A = \
+_TEST_FILES_0 = \
 	test_fallback.basic.html \
 	test_fallback.multiple.html \
 	test_fallback.nested.html \
 	test_type.name.html \
 	test_type.exists.html \
 	test_type.delete.html \
 	test_type.prototype.html \
 	test_type.replace.html \
@@ -82,29 +81,46 @@ include $(topsrcdir)/config/rules.mk
 	test_initial.colour.html \
 	test_initial.reset.different.html \
 	test_initial.reset.same.html \
 	test_initial.reset.path.html \
 	test_initial.reset.clip.html \
 	test_initial.reset.transform.html \
 	test_initial.reset.gradient.html \
 	test_initial.reset.pattern.html \
+	test_context.emptystring.html \
+	test_context.unrecognised.badname.html \
+	test_context.unrecognised.badsuffix.html \
+	test_context.unrecognised.nullsuffix.html \
+	test_context.unrecognised.unicode.html \
+	test_context.casesensitive.html \
+	test_context.arguments.missing.html \
+	test_context.arguments.extra.html \
 	test_toDataURL.default.html \
 	test_toDataURL.png.html \
+	test_toDataURL.unrecognised.html \
+	test_toDataURL.lowercase.html \
+	test_toDataURL.arguments.1.html \
+	test_toDataURL.arguments.2.html \
+	test_toDataURL.arguments.3.html \
 	test_toDataURL.nocontext.html \
+	test_toDataURL.zerosize.html \
+	test_toDataURL.primarycolours.html \
+	test_toDataURL.complexcolours.html \
 	test_2d.getcontext.exists.html \
-	test_2d.type.name.html \
 	test_2d.type.exists.html \
 	test_2d.type.delete.html \
 	test_2d.type.prototype.html \
 	test_2d.type.replace.html \
 	test_2d.type.extend.html \
 	test_2d.getcontext.unique.html \
 	test_2d.getcontext.shared.html \
 	test_2d.voidreturn.html \
+	test_2d.missingargs.html \
+	test_2d.scaled.html \
 	test_2d.canvas.reference.html \
 	test_2d.canvas.readonly.html \
 	test_2d.state.saverestore.strokeStyle.html \
 	test_2d.state.saverestore.fillStyle.html \
 	test_2d.state.saverestore.globalAlpha.html \
 	test_2d.state.saverestore.lineWidth.html \
 	test_2d.state.saverestore.lineCap.html \
 	test_2d.state.saverestore.lineJoin.html \
@@ -116,453 +132,696 @@ include $(topsrcdir)/config/rules.mk
 	test_2d.state.saverestore.globalCompositeOperation.html \
 	test_initial.reset.2dstate.html \
 	test_2d.state.saverestore.transformation.html \
 	test_2d.state.saverestore.clip.html \
 	test_2d.state.saverestore.path.html \
 	test_2d.state.saverestore.bitmap.html \
 	test_2d.state.saverestore.stack.html \
 	test_2d.state.saverestore.stackdepth.html \
+	test_2d.state.saverestore.underflow.html \
 	test_2d.transformation.order.html \
 	test_2d.transformation.scale.basic.html \
 	test_2d.transformation.scale.zero.html \
 	test_2d.transformation.scale.negative.html \
 	test_2d.transformation.scale.large.html \
+	test_2d.transformation.scale.nonfinite.html \
 	test_2d.transformation.scale.multiple.html \
+	$(NULL)
+
+_TEST_FILES_1 = \
 	test_2d.transformation.rotate.zero.html \
 	test_2d.transformation.rotate.radians.html \
 	test_2d.transformation.rotate.direction.html \
 	test_2d.transformation.rotate.wrap.html \
 	test_2d.transformation.rotate.wrapnegative.html \
-	test_2d.transformation.rotate.infinity.html \
-	test_2d.transformation.rotate.neginfinity.html \
-	test_2d.transformation.rotate.nan.html \
+	test_2d.transformation.rotate.nonfinite.html \
 	test_2d.transformation.translate.basic.html \
+	test_2d.transformation.translate.nonfinite.html \
 	test_2d.transformation.transform.identity.html \
 	test_2d.transformation.transform.skewed.html \
 	test_2d.transformation.transform.multiply.html \
+	test_2d.transformation.transform.nonfinite.html \
 	test_2d.transformation.setTransform.skewed.html \
 	test_2d.transformation.setTransform.multiple.html \
+	test_2d.transformation.setTransform.nonfinite.html \
 	test_2d.composite.globalAlpha.range.html \
+	test_2d.composite.globalAlpha.invalid.html \
 	test_2d.composite.globalAlpha.default.html \
 	test_2d.composite.globalAlpha.fill.html \
 	test_2d.composite.globalAlpha.image.html \
 	test_2d.composite.globalAlpha.canvas.html \
 	test_2d.composite.globalAlpha.imagepattern.html \
 	test_2d.composite.globalAlpha.canvaspattern.html \
-	$(NULL)
-# The following two tests tend to fail randomly.
-#       test_toDataURL.primarycolours.html 
-#       test_toDataURL.complexcolours.html 
-
-_TEST_FILES_B = \
 	test_2d.composite.solid.source-over.html \
 	test_2d.composite.solid.destination-over.html \
 	test_2d.composite.solid.source-in.html \
 	test_2d.composite.solid.destination-in.html \
 	test_2d.composite.solid.source-out.html \
 	test_2d.composite.solid.destination-out.html \
 	test_2d.composite.solid.source-atop.html \
 	test_2d.composite.solid.destination-atop.html \
+	test_2d.composite.solid.xor.html \
 	test_2d.composite.solid.copy.html \
 	test_2d.composite.solid.lighter.html \
 	test_2d.composite.transparent.source-over.html \
 	test_2d.composite.transparent.destination-over.html \
 	test_2d.composite.transparent.source-in.html \
 	test_2d.composite.transparent.destination-in.html \
 	test_2d.composite.transparent.source-out.html \
 	test_2d.composite.transparent.destination-out.html \
 	test_2d.composite.transparent.source-atop.html \
 	test_2d.composite.transparent.destination-atop.html \
 	test_2d.composite.transparent.xor.html \
 	test_2d.composite.transparent.copy.html \
 	test_2d.composite.transparent.lighter.html \
 	test_2d.composite.image.source-over.html \
+	test_2d.composite.image.destination-over.html \
 	test_2d.composite.image.source-in.html \
+	test_2d.composite.image.destination-in.html \
 	test_2d.composite.image.source-out.html \
+	test_2d.composite.image.destination-out.html \
 	test_2d.composite.image.source-atop.html \
-	test_2d.composite.image.destination-over.html \
-	test_2d.composite.image.destination-in.html \
-	test_2d.composite.image.destination-out.html \
 	test_2d.composite.image.destination-atop.html \
 	test_2d.composite.image.xor.html \
 	test_2d.composite.image.copy.html \
 	test_2d.composite.image.lighter.html \
+	test_2d.composite.canvas.source-over.html \
+	test_2d.composite.canvas.destination-over.html \
+	test_2d.composite.canvas.source-in.html \
+	test_2d.composite.canvas.destination-in.html \
+	test_2d.composite.canvas.source-out.html \
+	test_2d.composite.canvas.destination-out.html \
+	test_2d.composite.canvas.source-atop.html \
+	test_2d.composite.canvas.destination-atop.html \
+	test_2d.composite.canvas.xor.html \
+	test_2d.composite.canvas.copy.html \
+	test_2d.composite.canvas.lighter.html \
+	test_2d.composite.uncovered.fill.copy.html \
+	test_2d.composite.uncovered.image.source-in.html \
+	test_2d.composite.uncovered.image.destination-in.html \
+	test_2d.composite.uncovered.image.source-out.html \
+	test_2d.composite.uncovered.image.destination-atop.html \
+	test_2d.composite.uncovered.image.copy.html \
+	test_2d.composite.uncovered.pattern.copy.html \
+	test_2d.composite.clip.source-over.html \
+	test_2d.composite.clip.destination-over.html \
+	test_2d.composite.clip.source-in.html \
+	test_2d.composite.clip.destination-in.html \
+	test_2d.composite.clip.source-out.html \
+	test_2d.composite.clip.destination-out.html \
+	test_2d.composite.clip.source-atop.html \
+	test_2d.composite.clip.destination-atop.html \
+	test_2d.composite.clip.xor.html \
+	test_2d.composite.clip.copy.html \
+	test_2d.composite.clip.lighter.html \
 	test_2d.composite.operation.get.html \
+	test_2d.composite.operation.unrecognised.html \
 	test_2d.composite.operation.darker.html \
 	test_2d.composite.operation.over.html \
 	test_2d.composite.operation.clear.html \
+	test_2d.composite.operation.highlight.html \
+	test_2d.composite.operation.nullsuffix.html \
+	$(NULL)
+
+_TEST_FILES_2 = \
+	test_2d.composite.operation.casesensitive.html \
 	test_2d.composite.operation.default.html \
 	test_2d.fillStyle.parse.html4.html \
 	test_2d.fillStyle.parse.hex3.html \
 	test_2d.fillStyle.parse.hex6.html \
 	test_2d.fillStyle.parse.rgb-num.html \
 	test_2d.fillStyle.parse.rgb-clamp-1.html \
 	test_2d.fillStyle.parse.rgb-clamp-2.html \
+	test_2d.fillStyle.parse.rgb-clamp-3.html \
+	test_2d.fillStyle.parse.rgb-clamp-4.html \
+	test_2d.fillStyle.parse.rgb-clamp-5.html \
 	test_2d.fillStyle.parse.rgb-percent.html \
 	test_2d.fillStyle.parse.rgba-solid-1.html \
 	test_2d.fillStyle.parse.rgba-solid-2.html \
 	test_2d.fillStyle.parse.rgba-num-1.html \
 	test_2d.fillStyle.parse.rgba-num-2.html \
 	test_2d.fillStyle.parse.rgba-percent.html \
 	test_2d.fillStyle.parse.rgba-clamp-1.html \
 	test_2d.fillStyle.parse.rgba-clamp-2.html \
 	test_2d.fillStyle.parse.transparent-1.html \
 	test_2d.fillStyle.parse.transparent-2.html \
 	test_2d.fillStyle.parse.hsl-1.html \
 	test_2d.fillStyle.parse.hsl-2.html \
 	test_2d.fillStyle.parse.hsl-3.html \
 	test_2d.fillStyle.parse.hsl-4.html \
 	test_2d.fillStyle.parse.hsl-5.html \
+	test_2d.fillStyle.parse.hsl-clamp-1.html \
+	test_2d.fillStyle.parse.hsl-clamp-2.html \
+	test_2d.fillStyle.parse.hsl-clamp-3.html \
+	test_2d.fillStyle.parse.hsl-clamp-4.html \
 	test_2d.fillStyle.parse.hsla-1.html \
 	test_2d.fillStyle.parse.hsla-2.html \
+	test_2d.fillStyle.parse.hsla-clamp-1.html \
+	test_2d.fillStyle.parse.hsla-clamp-2.html \
+	test_2d.fillStyle.parse.hsla-clamp-3.html \
+	test_2d.fillStyle.parse.hsla-clamp-4.html \
+	test_2d.fillStyle.parse.hsla-clamp-5.html \
+	test_2d.fillStyle.parse.hsla-clamp-6.html \
 	test_2d.fillStyle.parse.svg-1.html \
 	test_2d.fillStyle.parse.svg-2.html \
 	test_2d.fillStyle.parse.invalid.hex3.html \
 	test_2d.fillStyle.parse.invalid.hex6.html \
 	test_2d.fillStyle.parse.invalid.rgb-1.html \
 	test_2d.fillStyle.parse.invalid.rgb-2.html \
 	test_2d.fillStyle.parse.invalid.rgb-3.html \
 	test_2d.fillStyle.parse.invalid.rgb-4.html \
+	test_2d.fillStyle.parse.invalid.rgb-5.html \
+	test_2d.fillStyle.parse.invalid.rgb-6.html \
+	test_2d.fillStyle.parse.invalid.rgb-7.html \
 	test_2d.fillStyle.parse.invalid.rgba-1.html \
 	test_2d.fillStyle.parse.invalid.rgba-2.html \
 	test_2d.fillStyle.parse.invalid.rgba-3.html \
 	test_2d.fillStyle.parse.invalid.rgba-4.html \
 	test_2d.fillStyle.parse.invalid.rgba-5.html \
 	test_2d.fillStyle.parse.invalid.hsl-1.html \
 	test_2d.fillStyle.parse.invalid.hsl-2.html \
 	test_2d.fillStyle.parse.invalid.hsl-3.html \
 	test_2d.fillStyle.parse.invalid.hsl-4.html \
+	test_2d.fillStyle.parse.invalid.hsl-5.html \
+	test_2d.fillStyle.parse.invalid.hsla-1.html \
+	test_2d.fillStyle.parse.invalid.hsla-2.html \
 	test_2d.fillStyle.parse.system.html \
-	test_2d.fillStyle.parse.flavor.html \
+	test_2d.fillStyle.parse.current.basic.html \
+	test_2d.fillStyle.parse.current.changed.html \
+	test_2d.fillStyle.parse.current.removed.html \
 	test_2d.fillStyle.invalidstring.html \
 	test_2d.fillStyle.invalidtype.html \
 	test_2d.fillStyle.get.solid.html \
 	test_2d.fillStyle.get.semitransparent.html \
 	test_2d.fillStyle.get.transparent.html \
 	test_2d.fillStyle.default.html \
 	test_2d.strokeStyle.default.html \
+	test_2d.gradient.object.type.html \
 	test_2d.gradient.object.return.html \
 	test_2d.gradient.interpolate.solid.html \
 	test_2d.gradient.interpolate.colour.html \
 	test_2d.gradient.interpolate.alpha.html \
 	test_2d.gradient.interpolate.colouralpha.html \
 	test_2d.gradient.interpolate.outside.html \
 	test_2d.gradient.interpolate.zerosize.html \
 	test_2d.gradient.interpolate.vertical.html \
 	test_2d.gradient.interpolate.multiple.html \
 	test_2d.gradient.interpolate.overlap.html \
 	test_2d.gradient.interpolate.overlap2.html \
+	test_2d.gradient.empty.html \
 	test_2d.gradient.object.update.html \
 	test_2d.gradient.object.compare.html \
 	test_2d.gradient.object.crosscanvas.html \
 	test_2d.gradient.object.invalidoffset.html \
 	test_2d.gradient.object.invalidcolour.html \
+	test_2d.gradient.linear.nonfinite.html \
+	test_2d.gradient.linear.transform.1.html \
+	test_2d.gradient.linear.transform.2.html \
+	test_2d.gradient.linear.transform.3.html \
+	test_2d.gradient.radial.negative.html \
+	test_2d.gradient.radial.nonfinite.html \
+	test_2d.gradient.radial.inside1.html \
 	$(NULL)
 
-_TEST_FILES_C = \
-	test_2d.gradient.radial.negative.html \
-	test_2d.gradient.radial.invalid.html \
-	test_2d.gradient.radial.inside1.html \
-	test_2d.gradient.radial.inside2.html \
-	test_2d.gradient.radial.outside1.html \
-	test_2d.gradient.radial.cone.front.html \
+_TEST_FILES_3 = \
 	test_2d.gradient.radial.cone.bottom.html \
-	test_2d.gradient.radial.cone.top.html \
 	test_2d.gradient.radial.cone.cylinder.html \
 	test_2d.gradient.radial.cone.shape1.html \
+	test_2d.gradient.radial.transform.1.html \
+	test_2d.gradient.radial.transform.2.html \
+	test_2d.gradient.radial.transform.3.html \
 	test_2d.pattern.basic.type.html \
 	test_2d.pattern.basic.image.html \
 	test_2d.pattern.basic.canvas.html \
+	test_2d.pattern.basic.zerocanvas.html \
 	test_2d.pattern.basic.nocontext.html \
 	test_2d.pattern.image.undefined.html \
 	test_2d.pattern.image.null.html \
 	test_2d.pattern.image.string.html \
 	test_2d.pattern.image.incomplete.html \
 	test_2d.pattern.image.broken.html \
 	test_2d.pattern.repeat.empty.html \
 	test_2d.pattern.repeat.null.html \
 	test_2d.pattern.repeat.undefined.html \
-	test_2d.pattern.repeat.missing.html \
 	test_2d.pattern.repeat.unrecognised.html \
 	test_2d.pattern.repeat.case.html \
 	test_2d.pattern.repeat.nullsuffix.html \
 	test_2d.pattern.modify.image1.html \
 	test_2d.pattern.modify.image2.html \
 	test_2d.pattern.modify.canvas1.html \
 	test_2d.pattern.modify.canvas2.html \
 	test_2d.pattern.crosscanvas.html \
 	test_2d.pattern.paint.norepeat.basic.html \
 	test_2d.pattern.paint.norepeat.outside.html \
 	test_2d.pattern.paint.norepeat.coord1.html \
 	test_2d.pattern.paint.norepeat.coord2.html \
-	test_2d.pattern.paint.coord3.html \
+	test_2d.pattern.paint.norepeat.coord3.html \
 	test_2d.pattern.paint.repeat.basic.html \
 	test_2d.pattern.paint.repeat.outside.html \
 	test_2d.pattern.paint.repeat.coord1.html \
 	test_2d.pattern.paint.repeat.coord2.html \
 	test_2d.pattern.paint.repeat.coord3.html \
 	test_2d.pattern.paint.repeatx.basic.html \
 	test_2d.pattern.paint.repeatx.outside.html \
 	test_2d.pattern.paint.repeatx.coord1.html \
 	test_2d.pattern.paint.repeaty.basic.html \
 	test_2d.pattern.paint.repeaty.outside.html \
 	test_2d.pattern.paint.repeaty.coord1.html \
+	test_2d.pattern.paint.orientation.image.html \
+	test_2d.pattern.paint.orientation.canvas.html \
+	test_2d.pattern.animated.gif.html \
 	test_2d.line.defaults.html \
-	test_2d.line.invalid.lineWidth.html \
-	test_2d.line.invalid.miterLimit.html \
-	test_2d.line.lineWidth.basic.html \
-	test_2d.line.lineWidth.transformed.html \
-	test_2d.line.lineCap.butt.html \
-	test_2d.line.lineCap.round.html \
-	test_2d.line.lineCap.square.html \
-	test_2d.line.lineJoin.bevel.html \
-	test_2d.line.lineJoin.round.html \
-	test_2d.line.lineJoin.miter.html \
+	test_2d.line.width.basic.html \
+	test_2d.line.width.transformed.html \
+	test_2d.line.width.invalid.html \
+	test_2d.line.cap.butt.html \
+	test_2d.line.cap.round.html \
+	test_2d.line.cap.square.html \
+	test_2d.line.cap.open.html \
+	test_2d.line.cap.invalid.html \
+	test_2d.line.join.bevel.html \
+	test_2d.line.join.round.html \
+	test_2d.line.join.miter.html \
 	test_2d.line.join.open.html \
 	test_2d.line.join.closed.html \
-	test_2d.line.join.zeroline.join.html \
-	test_2d.line.cap.open.html \
-	test_2d.line.cap.zeroline.round.html \
-	test_2d.line.cap.zeroline.square.html \
+	test_2d.line.join.invalid.html \
 	test_2d.line.miter.exceeded.html \
+	test_2d.line.miter.acute.html \
+	test_2d.line.miter.obtuse.html \
 	test_2d.line.miter.rightangle.html \
 	test_2d.line.miter.lineedge.html \
+	test_2d.line.miter.within.html \
+	test_2d.line.miter.invalid.html \
 	test_2d.line.cross.html \
 	test_2d.line.union.html \
 	test_2d.clearRect.basic.html \
 	test_2d.clearRect.path.html \
 	test_2d.clearRect.zero.html \
+	test_2d.clearRect.negative.html \
 	test_2d.clearRect.transform.html \
 	test_2d.clearRect.globalalpha.html \
 	test_2d.clearRect.globalcomposite.html \
 	test_2d.clearRect.clip.html \
 	test_2d.clearRect.shadow.html \
-	test_2d.fillRect.negative.html \
+	test_2d.clearRect.nonfinite.html \
 	test_2d.fillRect.basic.html \
 	test_2d.fillRect.path.html \
 	test_2d.fillRect.zero.html \
+	test_2d.fillRect.negative.html \
 	test_2d.fillRect.transform.html \
 	test_2d.fillRect.clip.html \
 	test_2d.fillRect.shadow.html \
-	test_2d.strokeRect.negative.html \
+	$(NULL)
+
+_TEST_FILES_4 = \
+	test_2d.fillRect.nonfinite.html \
 	test_2d.strokeRect.basic.html \
 	test_2d.strokeRect.path.html \
 	test_2d.strokeRect.zero.1.html \
 	test_2d.strokeRect.zero.2.html \
 	test_2d.strokeRect.zero.3.html \
 	test_2d.strokeRect.zero.4.html \
+	test_2d.strokeRect.negative.html \
 	test_2d.strokeRect.transform.html \
 	test_2d.strokeRect.globalalpha.html \
 	test_2d.strokeRect.globalcomposite.html \
 	test_2d.strokeRect.clip.html \
 	test_2d.strokeRect.shadow.html \
-	$(NULL)
-
-_TEST_FILES_D = \
+	test_2d.strokeRect.nonfinite.html \
 	test_2d.path.initial.html \
 	test_2d.path.beginPath.html \
 	test_2d.path.moveTo.basic.html \
 	test_2d.path.moveTo.newsubpath.html \
 	test_2d.path.moveTo.multiple.html \
+	test_2d.path.moveTo.nonfinite.html \
 	test_2d.path.closePath.empty.html \
 	test_2d.path.closePath.newline.html \
 	test_2d.path.closePath.nextpoint.html \
 	test_2d.path.lineTo.emptysubpath.html \
 	test_2d.path.lineTo.basic.html \
 	test_2d.path.lineTo.nextpoint.html \
+	test_2d.path.lineTo.nonfinite.html \
 	test_2d.path.quadraticCurveTo.emptysubpath.html \
 	test_2d.path.quadraticCurveTo.basic.html \
 	test_2d.path.quadraticCurveTo.shape.html \
 	test_2d.path.quadraticCurveTo.scaled.html \
+	test_2d.path.quadraticCurveTo.nonfinite.html \
 	test_2d.path.bezierCurveTo.emptysubpath.html \
 	test_2d.path.bezierCurveTo.basic.html \
 	test_2d.path.bezierCurveTo.shape.html \
 	test_2d.path.bezierCurveTo.scaled.html \
+	test_2d.path.bezierCurveTo.nonfinite.html \
+	test_2d.path.arcTo.emptysubpath.html \
+	test_2d.path.arcTo.coincide.1.html \
+	test_2d.path.arcTo.coincide.2.html \
+	test_2d.path.arcTo.collinear.1.html \
+	test_2d.path.arcTo.collinear.2.html \
+	test_2d.path.arcTo.collinear.3.html \
+	test_2d.path.arcTo.shape.curve1.html \
+	test_2d.path.arcTo.shape.curve2.html \
+	test_2d.path.arcTo.shape.start.html \
+	test_2d.path.arcTo.shape.end.html \
+	test_2d.path.arcTo.negative.html \
+	test_2d.path.arcTo.zero.1.html \
+	test_2d.path.arcTo.zero.2.html \
+	test_2d.path.arcTo.transformation.html \
+	test_2d.path.arcTo.scale.html \
+	test_2d.path.arcTo.nonfinite.html \
 	test_2d.path.arc.empty.html \
 	test_2d.path.arc.nonempty.html \
 	test_2d.path.arc.end.html \
 	test_2d.path.arc.angle.1.html \
 	test_2d.path.arc.angle.2.html \
 	test_2d.path.arc.angle.3.html \
 	test_2d.path.arc.angle.4.html \
+	test_2d.path.arc.angle.5.html \
+	test_2d.path.arc.angle.6.html \
 	test_2d.path.arc.zero.1.html \
 	test_2d.path.arc.zero.2.html \
-	test_2d.path.arc.zero.3.html \
-	test_2d.path.arc.zero.4.html \
-	test_2d.path.arc.zero.5.html \
-	test_2d.path.arc.zero.6.html \
+	test_2d.path.arc.twopie.1.html \
+	test_2d.path.arc.twopie.2.html \
+	test_2d.path.arc.twopie.3.html \
+	test_2d.path.arc.twopie.4.html \
 	test_2d.path.arc.shape.1.html \
 	test_2d.path.arc.shape.2.html \
-	test_2d.path.arc.shape.3.html \
 	test_2d.path.arc.shape.4.html \
 	test_2d.path.arc.shape.5.html \
 	test_2d.path.arc.selfintersect.1.html \
 	test_2d.path.arc.selfintersect.2.html \
 	test_2d.path.arc.negative.html \
-	test_2d.path.arc.zero.html \
+	test_2d.path.arc.zeroradius.html \
+	test_2d.path.arc.scale.1.html \
+	test_2d.path.arc.scale.2.html \
+	test_2d.path.arc.nonfinite.html \
 	test_2d.path.rect.basic.html \
 	test_2d.path.rect.newsubpath.html \
 	test_2d.path.rect.closed.html \
 	test_2d.path.rect.end.1.html \
 	test_2d.path.rect.end.2.html \
 	test_2d.path.rect.zero.1.html \
 	test_2d.path.rect.zero.2.html \
 	test_2d.path.rect.zero.3.html \
 	test_2d.path.rect.zero.4.html \
 	test_2d.path.rect.zero.5.html \
 	test_2d.path.rect.negative.html \
+	test_2d.path.rect.winding.html \
+	test_2d.path.rect.nonfinite.html \
+	test_2d.path.fill.overlap.html \
 	test_2d.path.fill.winding.add.html \
 	test_2d.path.fill.winding.subtract.1.html \
 	test_2d.path.fill.winding.subtract.2.html \
+	$(NULL)
+
+_TEST_FILES_5 = \
 	test_2d.path.fill.winding.subtract.3.html \
 	test_2d.path.fill.closed.basic.html \
 	test_2d.path.fill.closed.unaffected.html \
+	test_2d.path.stroke.overlap.html \
 	test_2d.path.stroke.union.html \
 	test_2d.path.stroke.unaffected.html \
+	test_2d.path.stroke.scale1.html \
+	test_2d.path.stroke.scale2.html \
+	test_2d.path.stroke.skew.html \
+	test_2d.path.stroke.empty.html \
+	test_2d.path.stroke.prune.line.html \
+	test_2d.path.stroke.prune.closed.html \
+	test_2d.path.stroke.prune.curve.html \
+	test_2d.path.stroke.prune.arc.html \
+	test_2d.path.stroke.prune.rect.html \
+	test_2d.path.stroke.prune.corner.html \
 	test_2d.path.transformation.basic.html \
-	test_2d.path.transformation.multiple.1.html \
-	test_2d.path.transformation.multiple.2.html \
-	test_2d.path.transformation.multiple.3.html \
+	test_2d.path.transformation.multiple.html \
+	test_2d.path.transformation.changing.html \
 	test_2d.path.clip.empty.html \
 	test_2d.path.clip.basic.1.html \
 	test_2d.path.clip.basic.2.html \
 	test_2d.path.clip.intersect.html \
 	test_2d.path.clip.winding.1.html \
 	test_2d.path.clip.winding.2.html \
 	test_2d.path.clip.unaffected.html \
 	test_2d.path.isPointInPath.basic.1.html \
 	test_2d.path.isPointInPath.basic.2.html \
+	test_2d.path.isPointInPath.edge.html \
 	test_2d.path.isPointInPath.empty.html \
+	test_2d.path.isPointInPath.subpath.html \
+	test_2d.path.isPointInPath.outside.html \
 	test_2d.path.isPointInPath.unclosed.html \
+	test_2d.path.isPointInPath.arc.html \
+	test_2d.path.isPointInPath.bigarc.html \
+	test_2d.path.isPointInPath.bezier.html \
 	test_2d.path.isPointInPath.winding.html \
 	test_2d.path.isPointInPath.transform.1.html \
 	test_2d.path.isPointInPath.transform.2.html \
 	test_2d.path.isPointInPath.transform.3.html \
+	test_2d.path.isPointInPath.nonfinite.html \
 	test_2d.drawImage.3arg.html \
 	test_2d.drawImage.5arg.html \
 	test_2d.drawImage.9arg.basic.html \
 	test_2d.drawImage.9arg.sourcepos.html \
 	test_2d.drawImage.9arg.sourcesize.html \
 	test_2d.drawImage.9arg.destpos.html \
 	test_2d.drawImage.9arg.destsize.html \
+	test_2d.drawImage.canvas.html \
+	test_2d.drawImage.self.1.html \
+	test_2d.drawImage.self.2.html \
 	test_2d.drawImage.null.html \
 	test_2d.drawImage.wrongtype.html \
 	test_2d.drawImage.floatsource.html \
 	test_2d.drawImage.zerosource.html \
 	test_2d.drawImage.negativesource.html \
 	test_2d.drawImage.negativedest.html \
 	test_2d.drawImage.outsidesource.html \
 	test_2d.drawImage.incomplete.html \
 	test_2d.drawImage.broken.html \
+	test_2d.drawImage.animated.gif.html \
+	test_2d.drawImage.animated.apng.html \
+	test_2d.drawImage.animated.poster.html \
 	test_2d.drawImage.path.html \
 	test_2d.drawImage.transform.html \
 	test_2d.drawImage.alpha.html \
 	test_2d.drawImage.clip.html \
 	test_2d.drawImage.composite.html \
-	test_2d.drawImage.self.html \
-	$(NULL)
-
-_TEST_FILES_E = \
+	test_2d.drawImage.nowrap.html \
+	test_2d.drawImage.nonfinite.html \
+	test_2d.imageData.create.basic.html \
+	test_2d.imageData.create.type.html \
+	test_2d.imageData.create.initial.html \
+	test_2d.imageData.create.large.html \
+	test_2d.imageData.create.tiny.html \
+	test_2d.imageData.create.negative.html \
+	test_2d.imageData.create.zero.html \
+	test_2d.imageData.create.nonfinite.html \
+	test_2d.imageData.create.round.html \
 	test_2d.imageData.get.basic.html \
-	test_2d.imageData.get.sourcepos.html \
-	test_2d.imageData.get.values.html \
-	test_2d.imageData.get.sourcesize.html \
-	test_2d.imageData.get.properties.html \
+	test_2d.imageData.get.type.html \
+	test_2d.imageData.get.zero.html \
+	test_2d.imageData.get.nonfinite.html \
+	test_2d.imageData.get.source.outside.html \
+	test_2d.imageData.get.source.negative.html \
+	test_2d.imageData.get.source.size.html \
+	test_2d.imageData.get.tiny.html \
 	test_2d.imageData.get.nonpremul.html \
+	test_2d.imageData.get.range.html \
+	test_2d.imageData.get.clamp.html \
 	test_2d.imageData.get.order.cols.html \
 	test_2d.imageData.get.order.rows.html \
 	test_2d.imageData.get.order.rgb.html \
 	test_2d.imageData.get.order.alpha.html \
-	test_2d.imageData.get.smallest.html \
-	test_2d.imageData.get.nonpositive.html \
-	test_2d.imageData.get.nonfinite.html \
+	test_2d.imageData.get.unaffected.html \
+	test_2d.imageData.object.properties.html \
+	test_2d.imageData.object.readonly.html \
+	test_2d.imageData.object.ctor.html \
+	test_2d.imageData.object.set.html \
+	test_2d.imageData.object.undefined.html \
+	$(NULL)
+
+_TEST_FILES_6 = \
+	test_2d.imageData.object.nan.html \
+	test_2d.imageData.object.string.html \
+	test_2d.imageData.object.clamp.html \
+	test_2d.imageData.object.round.html \
+	test_2d.imageData.put.null.html \
+	test_2d.imageData.put.nonfinite.html \
 	test_2d.imageData.put.basic.html \
+	test_2d.imageData.put.created.html \
+	test_2d.imageData.put.wrongtype.html \
+	test_2d.imageData.put.cross.html \
 	test_2d.imageData.put.alpha.html \
 	test_2d.imageData.put.modified.html \
-	test_2d.imageData.put.type.correct.html \
-	test_2d.imageData.put.type.onepixel.html \
-	test_2d.imageData.put.type.extra.html \
-	test_2d.imageData.put.type.missing.html \
-	test_2d.imageData.put.type.invalidsize.html \
-	test_2d.imageData.put.type.invalidvalues.html \
+	test_2d.imageData.put.dirty.zero.html \
+	test_2d.imageData.put.dirty.rect1.html \
+	test_2d.imageData.put.dirty.rect2.html \
+	test_2d.imageData.put.dirty.negative.html \
+	test_2d.imageData.put.dirty.outside.html \
 	test_2d.imageData.put.unchanged.html \
 	test_2d.imageData.put.unaffected.html \
+	test_2d.imageData.put.clip.html \
 	test_2d.imageData.put.path.html \
+	test_2d.shadow.attributes.shadowBlur.1.html \
+	test_2d.shadow.attributes.shadowBlur.2.html \
+	test_2d.shadow.attributes.shadowOffset.1.html \
+	test_2d.shadow.attributes.shadowOffset.2.html \
+	test_2d.shadow.attributes.shadowColor.1.html \
+	test_2d.shadow.attributes.shadowColor.2.html \
+	test_2d.shadow.basic.1.html \
+	test_2d.shadow.basic.2.html \
+	test_2d.shadow.offset.positiveX.html \
+	test_2d.shadow.offset.negativeX.html \
+	test_2d.shadow.offset.positiveY.html \
+	test_2d.shadow.offset.negativeY.html \
+	test_2d.shadow.outside.html \
+	test_2d.shadow.clip.1.html \
+	test_2d.shadow.clip.2.html \
+	test_2d.shadow.clip.3.html \
+	test_2d.shadow.stroke.basic.html \
+	test_2d.shadow.stroke.cap.1.html \
+	test_2d.shadow.stroke.cap.2.html \
+	test_2d.shadow.stroke.join.1.html \
+	test_2d.shadow.stroke.join.2.html \
+	test_2d.shadow.stroke.join.3.html \
+	test_2d.shadow.image.basic.html \
+	test_2d.shadow.image.transparent.1.html \
+	test_2d.shadow.image.transparent.2.html \
+	test_2d.shadow.image.alpha.html \
+	test_2d.shadow.image.section.html \
+	test_2d.shadow.image.scale.html \
+	test_2d.shadow.canvas.basic.html \
+	test_2d.shadow.canvas.transparent.1.html \
+	test_2d.shadow.canvas.transparent.2.html \
+	test_2d.shadow.canvas.alpha.html \
+	test_2d.shadow.pattern.basic.html \
+	test_2d.shadow.pattern.transparent.1.html \
+	test_2d.shadow.pattern.transparent.2.html \
+	test_2d.shadow.pattern.alpha.html \
+	test_2d.shadow.gradient.basic.html \
+	test_2d.shadow.gradient.transparent.1.html \
+	test_2d.shadow.gradient.transparent.2.html \
+	test_2d.shadow.gradient.alpha.html \
+	test_2d.shadow.transform.1.html \
+	test_2d.shadow.transform.2.html \
+	test_2d.shadow.blur.low.html \
+	test_2d.shadow.blur.high.html \
+	test_2d.shadow.alpha.1.html \
+	test_2d.shadow.alpha.2.html \
+	test_2d.shadow.alpha.3.html \
+	test_2d.shadow.alpha.4.html \
+	test_2d.shadow.alpha.5.html \
+	test_2d.shadow.composite.1.html \
+	test_2d.shadow.composite.2.html \
+	test_2d.shadow.composite.3.html \
+	test_2d.shadow.composite.4.html \
 	test_bug397524.html \
 	test_bug405982.html \
-	image_transparent50.png \
-	image_redtransparent.png \
-	image_yellow.png \
-	image_green-16x16.png \
-	image_red-16x16.png \
-	image_green-1x1.png \
-	image_green-redirect \
-	image_green-redirect^headers^ \
-	image_ggrr-256x256.png \
-	image_yellow75.png \
-	image_broken.png \
-	image_rgrg-256x256.png \
-	image_red.png \
-	image_transparent.png \
-	image_green.png \
 	test_text.font.html \
 	test_text.textAlign.html \
 	test_text.textBaseline.html \
 	test_text.measure.html \
 	test_text.space.replace.html \
+	image_transparent50.png \
+	image_redtransparent.png \
+	image_yellow.png \
+	image_anim-poster-gr.png \
+	image_green-16x16.png \
+	image_red-16x16.png \
+	image_green-1x1.png \
+	image_ggrr-256x256.png \
+	image_yellow75.png \
+	image_anim-gr.gif \
+	image_rrgg-256x256.png \
+	image_broken.png \
+	image_anim-gr.png \
+	image_rgrg-256x256.png \
+	image_red.png \
+	image_transparent.png \
+	image_green.png \
+	image_green-redirect \
+	image_green-redirect^headers^ \
 	$(NULL)
 
-# This one test crashes Mac for now.  Bug 407104
-ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-_TEST_FILES_E += \
-	test_2d.gradient.empty.html \
-	$(NULL)
-endif
-
 # Tests that fail on Mac (possibly because spec is underdefined?).  Bug 407105
 ifneq ($(MOZ_WIDGET_TOOLKIT),cocoa)
 # XXX vlad don't test these anywhere, cairo behaviour changed
-#_TEST_FILES_E += \
-#	test_2d.line.join.parallel.html \
-#	test_2d.strokeRect.zero.5.html \
-#	test_2d.line.join.zeroline.corner.html \
-#	test_2d.line.miter.within.html \
-#	$(NULL)
+_TEST_FILES_3 += \
+	test_2d.line.join.parallel.html \
+	test_2d.strokeRect.zero.5.html \
+	$(NULL)
 
 # This is an issue with Quartz's handling of radial gradients and some numeric
 # imprecision that results in errors here.
-_TEST_FILES_D += test_2d.gradient.radial.inside3.html
+_TEST_FILES_2 += \
+	test_2d.gradient.radial.inside2.html \
+	test_2d.gradient.radial.inside3.html \
+	test_2d.gradient.radial.outside1.html \
+	$(NULL)
+
+_TEST_FILES_3 += \
+	test_2d.gradient.radial.cone.front.html \
+	test_2d.gradient.radial.cone.top.html \
+	$(NULL)
 
 # This is another Quartz bug -- closed paths that don't lie fully within the
 # destination bounds seem to have problems with the BEVEL/SQUARE join/cap combo.
 # The joins are rendered as if with MITER; the correct behaviour is also seen
 # if BUTT is used instead of SQUARE.
-_TEST_FILES_D += test_2d.line.cap.closed.html
+_TEST_FILES_4 += test_2d.line.cap.closed.html
 
-# test_2d.line.cap.zerobezier.round.html disabled for now, from above
 endif
 
 # Tests that fail on non-Mac (bug 407107)
 ifeq ($(MOZ_WIDGET_TOOLKIT),cocoa)
-_TEST_FILES_E += \
-	test_2d.path.rect.selfintersect.html \
+
+# still need bug numbers
+_TEST_FILES_1 += \
+	test_2d.composite.uncovered.fill.source-in.html \
+	test_2d.composite.uncovered.fill.destination-in.html \
+	test_2d.composite.uncovered.fill.source-out.html \
+	test_2d.composite.uncovered.fill.destination-atop.html \
+	test_2d.composite.uncovered.pattern.source-in.html \
+	test_2d.composite.uncovered.pattern.destination-in.html \
+	test_2d.composite.uncovered.pattern.source-out.html \
+	test_2d.composite.uncovered.pattern.destination-atop.html \
 	$(NULL)
+
+# still need bug numbers
+_TEST_FILES_3 += \
+	test_2d.gradient.radial.outside2.html \
+	test_2d.gradient.radial.outside3.html \
+	test_2d.gradient.radial.touch1.html \
+	test_2d.gradient.radial.touch2.html \
+	test_2d.gradient.radial.touch3.html \
+	test_2d.gradient.radial.equal.html \
+	test_2d.gradient.radial.cone.shape2.html \
+	test_2d.gradient.radial.cone.behind.html \
+	test_2d.gradient.radial.cone.beside.html \
+	$(NULL)
+
+# still need bug numbers
+_TEST_FILES_4 += test_2d.path.arc.shape.3.html
+
+_TEST_FILES_5 += test_2d.path.rect.selfintersect.html
 endif
 
 # This test is bogus according to the spec; see bug 407107
 # test_2d.path.rect.zero.6.html
 
 # split up into groups to work around command-line length limits
-libs:: $(_TEST_FILES_A)
+libs:: $(_TEST_FILES_0)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
-libs:: $(_TEST_FILES_B)
+libs:: $(_TEST_FILES_1)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+
+libs:: $(_TEST_FILES_2)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
-libs:: $(_TEST_FILES_C)
+libs:: $(_TEST_FILES_3)
+	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+
+libs:: $(_TEST_FILES_4)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
-libs:: $(_TEST_FILES_D)
+libs:: $(_TEST_FILES_5)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
 
-libs:: $(_TEST_FILES_E)
+libs:: $(_TEST_FILES_6)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/tests/$(relativesrcdir)
+
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..45263e0afba7b708417510df24cadf70d82d9116
GIT binary patch
literal 241
zc${<hbhEHbOkpr$_`txx@E?d76o0ZXFoNj++<vYh!Oo5Wu10zW%pf5hkUU5+1Cwt{
z|H{*E`4`XGa;tmuy*<DA+a7sLd)B$^)v0aoxQ~DGx&E#9`LA=||MBy1wI5mZvBO7e
u`k7^)IeWd9Us?6F>ulEcJL|r4^K~D8vgv1zHpEf^btD@az;2<sJ=Oq7Zf$q~
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..925e2efc9a97ade490f04d57271adc10b2fe69b6
GIT binary patch
literal 460
zc%17D@N?(olHy`uVBq!ia0vp^DL`z*!3HE(nbz$CQXGlNAwEEw35Xd!_f9SVQc`IU
zF$S0h1{h#ue!<AdlH<k+WKZ{WaSW-L^Y)w}FVL6+27hL^RdXHNc*P;zZ2gPI3341S
z2ZA`j$fEOFd$OSQ6eN!@qI*PL0OXMyX6lJR&V;lS#}H5u06lYYAuof0z>y8N>tDW?
y;59JlpK`aX<V`t4+Y(8kWRD(2!?q(5v}W*E9(=9Mn=k1Na;c}QpUXO@geCx54v$#?
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..6941207373e513cfe10729077f59d369c59e6046
GIT binary patch
literal 422
zc%17D@N?(olHy`uVBq!ia0vp^DL`z*!3HE(nbz$CQXGlNAwEEw5r`SK=)PP4q^5hi
zIEGZrd3(-~7pUNX!JpY})m+CmUU5h_TmPbQf*i-ofglbrvgo|lo-AlR1?WVnG>Eeq
zV18nNfnUro7#XcQ)Lnt>327;gAt28IJ#%p(FN1-=kqx)&U%r>%H8AL(a<{DHO*uo`
m5=o(Cj~+$Cwj&a>X7E=Ye64+b=gDaxhkCmDxvX<aXaWFlH;v)|
new file mode 100644
index e69de29bb2d1d6434b8b29ae775ad8c2e48c5391..7f6351565473f4b8db1fa69530700491f7c88a54
GIT binary patch
literal 120
zc%17D@N?(olHy`uVBq!ia0y~yU}OMcMrI(Dw#P~pNU;U@gt#*N2SSF6v%S^<MRYw~
z978hhy*;&&mw|zUdBMN`TjpIjxZ|MDvJM4~CKx(o2vo{o6K${h;gSC5>uw;Pr>mdK
II;Vst0P+qZp#T5?
--- a/content/canvas/test/test_2d.canvas.readonly.html
+++ b/content/canvas/test/test_2d.canvas.readonly.html
@@ -1,25 +1,27 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.canvas.readonly</title>
+<!-- Testing: CanvasRenderingContext2D.canvas is readonly -->
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
 
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
 var c = document.createElement('canvas');
 var d = ctx.canvas;
-try { ctx.canvas = c; } catch (e) {} // not specified whether this throws, I think
+ok(c !== d, "c !== d");
+try { ctx.canvas = c; } catch (e) {} // not sure whether this should throw or not...
 ok(ctx.canvas === d, "ctx.canvas === d");
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.canvas.reference.html
+++ b/content/canvas/test/test_2d.canvas.reference.html
@@ -1,22 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.canvas.reference</title>
+<!-- Testing: CanvasRenderingContext2D.canvas refers back to its canvas -->
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
 
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
 ok(ctx.canvas === canvas, "ctx.canvas === canvas");
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.basic.html
+++ b/content/canvas/test/test_2d.clearRect.basic.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.basic</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #0f0"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -26,12 +25,13 @@ MochiKit.DOM.addLoadEvent(function () {
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 100, 50);
 isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.clip.html
+++ b/content/canvas/test/test_2d.clearRect.clip.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.clip</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #f00"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -35,12 +34,13 @@ ctx.clip();
 
 ctx.clearRect(0, 0, 100, 50);
 
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 16, 16);
 
 isPixel(ctx, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.globalalpha.html
+++ b/content/canvas/test/test_2d.clearRect.globalalpha.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.globalalpha</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #0f0"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -27,12 +26,13 @@ var canvas = document.getElementById('c'
 var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalAlpha = 0.1;
 ctx.clearRect(0, 0, 100, 50);
 isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.globalcomposite.html
+++ b/content/canvas/test/test_2d.clearRect.globalcomposite.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.globalcomposite</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #0f0"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -27,12 +26,13 @@ var canvas = document.getElementById('c'
 var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalCompositeOperation = 'destination-atop';
 ctx.clearRect(0, 0, 100, 50);
 isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.clearRect.negative.html
@@ -0,0 +1,43 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.clearRect.negative</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50" style="background: #0f0"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,12, 0,0,0,0, "25,12", "0,0,0,0", 0);
+isPixel(ctx, 75,12, 0,0,0,0, "75,12", "0,0,0,0", 0);
+isPixel(ctx, 25,37, 0,0,0,0, "25,37", "0,0,0,0", 0);
+isPixel(ctx, 75,37, 0,0,0,0, "75,37", "0,0,0,0", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.clearRect.nonfinite.html
@@ -0,0 +1,70 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.clearRect.nonfinite</title>
+<!-- Testing: clearRect() with Infinity/NaN is ignored -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+var _thrown_outer = false;
+try {
+
+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);
+
+isPixel(ctx, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 0);
+
+} catch (e) {
+    _thrown_outer = true;
+}
+todo(!_thrown_outer, 'should not throw exception');
+
+SimpleTest.finish();
+
+});
+</script>
+
--- a/content/canvas/test/test_2d.clearRect.path.html
+++ b/content/canvas/test/test_2d.clearRect.path.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.path</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #f00"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -28,12 +27,13 @@ var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#0f0';
 ctx.beginPath();
 ctx.rect(0, 0, 100, 50);
 ctx.clearRect(0, 0, 16, 16);
 ctx.fill();
 isPixel(ctx, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.shadow.html
+++ b/content/canvas/test/test_2d.clearRect.shadow.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.shadow</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #f00"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -30,12 +29,13 @@ 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);
 isPixel(ctx, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.transform.html
+++ b/content/canvas/test/test_2d.clearRect.transform.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.transform</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #0f0"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -28,12 +27,13 @@ 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);
 isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.clearRect.zero.html
+++ b/content/canvas/test/test_2d.clearRect.zero.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.clearRect.zero</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50" style="background: #f00"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -28,12 +27,13 @@ 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);
 isPixel(ctx, 50,25, 0,255,0,255, "50,25", "0,255,0,255", 0);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.copy.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.copy</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'copy';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 255,255,0,191, "50,25", "255,255,0,191", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.destination-atop.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.destination-atop</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-atop';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 127,255,127,191, "50,25", "127,255,127,191", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.destination-in.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.destination-in</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-in';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 0,255,255,95, "50,25", "0,255,255,95", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.destination-out.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.destination-out</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-out';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 0,255,255,31, "50,25", "0,255,255,31", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.destination-over.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.destination-over</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'destination-over';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 109,255,145,223, "50,25", "109,255,145,223", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.lighter.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.lighter</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'lighter';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 191,255,127,255, "50,25", "191,255,127,255", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.source-atop.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.source-atop</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-atop';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 191,255,63,127, "50,25", "191,255,63,127", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.source-in.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.source-in</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-in';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 255,255,0,95, "50,25", "255,255,0,95", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.source-out.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.source-out</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-out';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 255,255,0,95, "50,25", "255,255,0,95", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.source-over.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.source-over</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'source-over';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 218,255,36,223, "50,25", "218,255,36,223", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.canvas.xor.html
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.canvas.xor</title>
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+var ctx = canvas.getContext('2d');
+
+
+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(0, 255, 255, 0.5)';
+ctx.fillRect(0, 0, 100, 50);
+ctx.globalCompositeOperation = 'xor';
+ctx.drawImage(canvas2, 0, 0);
+isPixel(ctx, 50,25, 191,255,63,127, "50,25", "191,255,63,127", 5);
+
+SimpleTest.finish();
+
+});
+</script>
+<img src="image_yellow75.png" id="yellow75.png" class="resource">
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.copy.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.copy</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.destination-atop.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.destination-atop</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.destination-in.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.destination-in</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.destination-out.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.destination-out</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.destination-over.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.destination-over</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.lighter.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.lighter</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.source-atop.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.source-atop</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.source-in.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.source-in</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.source-out.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.source-out</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.source-over.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.source-over</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
new file mode 100644
--- /dev/null
+++ b/content/canvas/test/test_2d.composite.clip.xor.html
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML>
+<title>Canvas test: 2d.composite.clip.xor</title>
+<!-- Testing: fill() does not affect pixels outside the clip region. -->
+<script src="/MochiKit/MochiKit.js"></script>
+<script src="/tests/SimpleTest/SimpleTest.js"></script>
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
+<body>
+<canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<script>
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    ok(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
+}
+
+SimpleTest.waitForExplicitFinish();
+MochiKit.DOM.addLoadEvent(function () {
+
+var canvas = document.getElementById('c');
+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);
+isPixel(ctx, 25,25, 0,255,0,255, "25,25", "0,255,0,255", 0);
+isPixel(ctx, 75,25, 0,255,0,255, "75,25", "0,255,0,255", 0);
+
+SimpleTest.finish();
+
+});
+</script>
+
--- a/content/canvas/test/test_2d.composite.globalAlpha.canvas.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.canvas.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.composite.globalAlpha.canvas</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -34,12 +33,13 @@ ctx2.fillStyle = '#f00';
 ctx2.fillRect(0, 0, 100, 50);
 
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
 ctx.drawImage(canvas2, 0, 0);
 isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.composite.globalAlpha.canvaspattern.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.canvaspattern.html
@@ -1,31 +1,39 @@
 <!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.canvaspattern</title>
+<title>Canvas test: 2d.composite.globalAlpha.canvaspattern - bug 401790</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 function todo_isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
-    isPixel(ctx, x,y, r,g,b,a, pos, colour, d, todo);
+    var pixel = ctx.getImageData(x, y, 1, 1);
+    var pr = pixel.data[0],
+        pg = pixel.data[1],
+        pb = pixel.data[2],
+        pa = pixel.data[3];
+    todo(r-d <= pr && pr <= r+d &&
+       g-d <= pg && pg <= g+d &&
+       b-d <= pb && pb <= b+d &&
+       a-d <= pa && pa <= a+d,
+       "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
 
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
@@ -38,12 +46,13 @@ ctx2.fillRect(0, 0, 100, 50);
 
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat');
 ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
 ctx.fillRect(0, 0, 100, 50);
 todo_isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.composite.globalAlpha.default.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.default.html
@@ -1,22 +1,22 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.composite.globalAlpha.default</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
 
 var canvas = document.getElementById('c');
 var ctx = canvas.getContext('2d');
 
 ok(ctx.globalAlpha === 1.0, "ctx.globalAlpha === 1.0");
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.composite.globalAlpha.fill.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.fill.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.composite.globalAlpha.fill</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -28,12 +27,13 @@ var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
 ctx.fillStyle = '#f00';
 ctx.fillRect(0, 0, 100, 50);
 isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 
--- a/content/canvas/test/test_2d.composite.globalAlpha.image.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.image.html
@@ -1,24 +1,23 @@
 <!DOCTYPE HTML>
 <title>Canvas test: 2d.composite.globalAlpha.image</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
         pg = pixel.data[1],
         pb = pixel.data[2],
         pa = pixel.data[3];
-    (f || ok)(r-d <= pr && pr <= r+d &&
+    ok(r-d <= pr && pr <= r+d &&
        g-d <= pg && pg <= g+d &&
        b-d <= pb && pb <= b+d &&
        a-d <= pa && pa <= a+d,
        "pixel "+pos+" is "+pr+","+pg+","+pb+","+pa+"; expected "+colour+" +/- "+d);
 }
 
 SimpleTest.waitForExplicitFinish();
 MochiKit.DOM.addLoadEvent(function () {
@@ -27,13 +26,14 @@ var canvas = document.getElementById('c'
 var ctx = canvas.getContext('2d');
 
 ctx.fillStyle = '#0f0';
 ctx.fillRect(0, 0, 100, 50);
 ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
 ctx.drawImage(document.getElementById('red.png'), 0, 0);
 isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
 
-if (!_deferred) SimpleTest.finish();
+SimpleTest.finish();
+
 });
 </script>
 <img src="image_red.png" id="red.png" class="resource">
 
--- a/content/canvas/test/test_2d.composite.globalAlpha.imagepattern.html
+++ b/content/canvas/test/test_2d.composite.globalAlpha.imagepattern.html
@@ -1,43 +1,52 @@
 <!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.imagepattern</title>
+<title>Canvas test: 2d.composite.globalAlpha.imagepattern - bug 401790</title>
 <script src="/MochiKit/MochiKit.js"></script>
 <script src="/tests/SimpleTest/SimpleTest.js"></script>
-<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css">
+<link rel="stylesheet" href="/tests/SimpleTest/test.css">
 <body>
 <canvas id="c" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
 <script>
-var _deferred = false;
-function isPixel(ctx, x,y, r,g,b,a, pos, colour, d, f) {
+function isPixel(ctx, x,y, r,g,b,a, pos, colour, d) {
     var pixel = ctx.getImageData(x, y, 1, 1);
     var pr = pixel.data[0],
<