Merge from mozilla-central default tip
authorBlair McBride <bmcbride@mozilla.com>
Tue, 20 Oct 2009 12:20:45 +1300
changeset 34254 3865bf230c4917cfb03e40056edbc5ff4eed99ad
parent 34088 d33d1a2173ed263171509bf5fb6bc94b494bcf7e (current diff)
parent 34253 f55bc23654b930fa9a9cedd7b4a0caf349ebc4a0 (diff)
push id115
push userbmcbride@mozilla.com
push dateMon, 19 Oct 2009 23:27:00 +0000
milestone1.9.3a1pre
Merge from mozilla-central
browser/installer/package-manifest.in
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-out.html
content/canvas/test/test_2d.composite.canvas.destination-over.html
content/canvas/test/test_2d.composite.canvas.source-atop.html
content/canvas/test/test_2d.composite.canvas.source-over.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.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.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-out.html
content/canvas/test/test_2d.composite.image.destination-over.html
content/canvas/test/test_2d.composite.image.source-atop.html
content/canvas/test/test_2d.composite.image.source-over.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.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.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.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.uncovered.fill.copy.html
content/canvas/test/test_2d.composite.uncovered.image.copy.html
content/canvas/test/test_2d.composite.uncovered.pattern.copy.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.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.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.bottom.html
content/canvas/test/test_2d.gradient.radial.cone.cylinder.html
content/canvas/test/test_2d.gradient.radial.cone.shape1.html
content/canvas/test/test_2d.gradient.radial.inside1.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.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.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.range.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.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.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.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.imageSmoothing.html
content/canvas/test/test_2d.imagedata_coercion.html
content/canvas/test/test_2d.line.cap.butt.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.cross.html
content/canvas/test/test_2d.line.defaults.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.round.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.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.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.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.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.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.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.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.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.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.prototype.html
content/canvas/test/test_2d.type.replace.html
content/canvas/test/test_2d.voidreturn.html
content/canvas/test/test_bug397524.html
content/canvas/test/test_bug405982.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_text.font.html
content/canvas/test/test_text.measure.html
content/canvas/test/test_text.space.replace.html
content/canvas/test/test_text.textAlign.html
content/canvas/test/test_text.textBaseline.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
layout/generic/crashtests/508115-1.xul
widget/src/beos/nsSound.cpp
widget/src/beos/nsSound.h
widget/src/cocoa/nsSound.h
widget/src/cocoa/nsSound.mm
widget/src/gtk2/nsSound.cpp
widget/src/gtk2/nsSound.h
widget/src/os2/nsSound.cpp
widget/src/os2/nsSound.h
widget/src/photon/nsSound.cpp
widget/src/photon/nsSound.h
widget/src/qt/nsSound.cpp
widget/src/qt/nsSound.h
widget/src/windows/nsSound.cpp
widget/src/windows/nsSound.h
--- a/.hgignore
+++ b/.hgignore
@@ -1,32 +1,34 @@
 # .hgignore - List of filenames hg should ignore
 
 # Filenames that should be ignored wherever they appear
 ~$
 \.pyc$
 (^|/)TAGS$
+(^|/)ID$
 (^|/)\.DS_Store$
 
 # User files that may appear at the root
 ^\.mozconfig
 ^mozconfig
 ^configure$
 ^config\.cache$
 ^config\.log$
-^ID$
 
 # Empty marker file that's generated when we check out NSS
 ^security/manager/\.nss\.checkout$
 
 # Build directories
 ^obj
 
 # Build directories for js shell
 _DBG\.OBJ/
 _OPT\.OBJ/
 
 # SpiderMonkey configury
 ^js/src/configure$
 ^js/src/autom4te.cache$
+# SpiderMonkey test result logs
+^js/src/tests/results-.*\.(html|txt)$
 
 # Java HTML5 parser classes
 ^parser/html/java/(html|java)parser/
--- a/accessible/public/nsIAccessibleRole.idl
+++ b/accessible/public/nsIAccessibleRole.idl
@@ -39,17 +39,17 @@
 #include "nsISupports.idl"
 
 /**
  * Defines cross platform (Gecko) roles.
  *
  * @note - When adding a new role, be sure to also add it to nsRoleMap.h for
  *         each platform.
  */
-[scriptable, uuid(6793ca5c-c7cb-41db-9fb9-c16c0525f962)]
+[scriptable, uuid(f134da65-39a8-4330-843c-5bd42780b34c)]
 interface nsIAccessibleRole : nsISupports
 {
   /**
    * Used when accessible hans't strong defined role.
    */
   const unsigned long ROLE_NOTHING = 0;
 
   /**
@@ -772,14 +772,19 @@ interface nsIAccessibleRole : nsISupport
   /**
    * Represents a cell within a grid. It is used for role="gridcell". Unlike
    * ROLE_CELL, it allows the calculation of the accessible name from subtree.
    * Also, see ROLE_TABLE.
    */
   const unsigned long ROLE_GRID_CELL = 121;
 
   /**
+   * Represents an embedded object. It is used for html:object or html:embed.
+   */
+  const unsigned long ROLE_EMBEDDED_OBJECT = 122;
+
+  /**
    * It's not role actually. This constant is important to help ensure
    * nsRoleMap's are synchronized.
    */
-  const unsigned long ROLE_LAST_ENTRY = 122;
+  const unsigned long ROLE_LAST_ENTRY = 123;
 };
 
--- a/accessible/src/atk/nsRoleMap.h
+++ b/accessible/src/atk/nsRoleMap.h
@@ -163,11 +163,12 @@ static const PRUint32 atkRoleMap[] = {
     ATK_ROLE_MENU,                // nsIAccessibleRole::ROLE_COMBOBOX_LIST        114
     ATK_ROLE_MENU_ITEM,           // nsIAccessibleRole::ROLE_COMBOBOX_OPTION      115
     ATK_ROLE_IMAGE,               // nsIAccessibleRole::ROLE_IMAGE_MAP            116
     ATK_ROLE_LIST_ITEM,           // nsIAccessibleRole::ROLE_OPTION               117
     ATK_ROLE_LIST_ITEM,           // nsIAccessibleRole::ROLE_RICH_OPTION          118
     ATK_ROLE_LIST,                // nsIAccessibleRole::ROLE_LISTBOX              119
     ATK_ROLE_UNKNOWN,             // nsIAccessibleRole::ROLE_FLAT_EQUATION        120
     ATK_ROLE_TABLE_CELL,          // nsIAccessibleRole::ROLE_GRID_CELL            121
+    ATK_ROLE_PANEL,               // nsIAccessibleRole::ROLE_EMBEDDED_OBJECT      122
     kROLE_ATK_LAST_ENTRY          // nsIAccessibleRole::ROLE_LAST_ENTRY
 };
 
--- a/accessible/src/base/nsAccessibilityService.cpp
+++ b/accessible/src/base/nsAccessibilityService.cpp
@@ -543,16 +543,25 @@ nsAccessibilityService::CreateHTMLAccess
   }
   else if (tag == nsAccessibilityAtoms::optgroup) {
     *aAccessible = new nsHTMLSelectOptGroupAccessible(aNode, aWeakShell);
   }
   else if (tag == nsAccessibilityAtoms::ul || tag == nsAccessibilityAtoms::ol) {
     *aAccessible = new nsHTMLListAccessible(aNode, aWeakShell);
   }
   else if (tag == nsAccessibilityAtoms::a) {
+
+    // Only some roles truly enjoy life as nsHTMLLinkAccessibles, for details
+    // see closed bug 494807.
+    nsRoleMapEntry *roleMapEntry = nsAccUtils::GetRoleMapEntry(aNode);
+    if (roleMapEntry && roleMapEntry->role != nsIAccessibleRole::ROLE_NOTHING
+        && roleMapEntry->role != nsIAccessibleRole::ROLE_LINK) {
+      return CreateHyperTextAccessible(aFrame, aAccessible);
+    }
+
     *aAccessible = new nsHTMLLinkAccessible(aNode, aWeakShell);
   }
   else if (tag == nsAccessibilityAtoms::li && aFrame->GetType() != nsAccessibilityAtoms::blockFrame) {
     // Normally this is created by the list item frame which knows about the bullet frame
     // However, in this case the list item must have been styled using display: foo
     *aAccessible = new nsHTMLLIAccessible(aNode, aWeakShell, EmptyString());
   }
   else if (tag == nsAccessibilityAtoms::abbr ||
@@ -758,25 +767,26 @@ nsAccessibilityService::CreateHTMLObject
   if (domDoc)
     return CreateOuterDocAccessible(node, aAccessible);
 
 #ifdef XP_WIN
   // 2) for plugins
   nsCOMPtr<nsIPluginInstance> pluginInstance ;
   aFrame->GetPluginInstance(*getter_AddRefs(pluginInstance));
   if (pluginInstance) {
+    // Note: pluginPort will be null if windowless.
     HWND pluginPort = nsnull;
     aFrame->GetPluginPort(&pluginPort);
-    if (pluginPort) {
-      *aAccessible = new nsHTMLWin32ObjectOwnerAccessible(node, weakShell, pluginPort);
-      if (*aAccessible) {
-        NS_ADDREF(*aAccessible);
-        return NS_OK;
-      }
-    }
+
+    *aAccessible =
+      new nsHTMLWin32ObjectOwnerAccessible(node, weakShell, pluginPort);
+    NS_ENSURE_TRUE(*aAccessible, NS_ERROR_OUT_OF_MEMORY);
+
+    NS_ADDREF(*aAccessible);
+    return NS_OK;
   }
 #endif
 
   // 3) for images and imagemaps, or anything else with a child frame
   // we have the object frame, get the image frame
   nsIFrame *frame = aFrame->GetFirstChild(nsnull);
   if (frame)
     return frame->GetAccessible(aAccessible);
--- a/accessible/src/base/nsAccessibilityService.h
+++ b/accessible/src/base/nsAccessibilityService.h
@@ -284,17 +284,18 @@ static const char kRoleNames[][20] = {
   "calendar",            //ROLE_CALENDAR
   "combobox list",       //ROLE_COMBOBOX_LIST
   "combobox option",     //ROLE_COMBOBOX_OPTION
   "image map",           //ROLE_IMAGE_MAP
   "listbox option",      //ROLE_OPTION
   "listbox rich option", //ROLE_RICH_OPTION
   "listbox",             //ROLE_LISTBOX
   "flat equation",       //ROLE_FLAT_EQUATION  
-  "gridcell"             //ROLE_GRID_CELL
+  "gridcell",            //ROLE_GRID_CELL
+  "embedded object"      //ROLE_EMBEDDED_OBJECT
 };
 
 /**
  * Map nsIAccessibleEvents constants to strings. Used by
  * nsIAccessibleRetrieval::getStringEventType() method.
  */
 static const char kEventTypeNames[][40] = {
   "unknown",                                 //
--- a/accessible/src/html/nsHTMLTableAccessible.cpp
+++ b/accessible/src/html/nsHTMLTableAccessible.cpp
@@ -919,40 +919,30 @@ nsHTMLTableAccessible::GetSelectedRowInd
   *aRows = outArray;
   return rv;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetCellAt(PRInt32 aRow, PRInt32 aColumn,
                                  nsIAccessible **aTableCellAccessible)
 {
-  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
-
-  nsresult rv = NS_OK;
-
   nsCOMPtr<nsIDOMElement> cellElement;
-  rv = GetCellAt(aRow, aColumn, *getter_AddRefs(cellElement));
+  nsresult rv = GetCellAt(aRow, aColumn, *getter_AddRefs(cellElement));
   NS_ENSURE_SUCCESS(rv, rv);
 
-  nsCOMPtr<nsIAccessibilityService>
-    accService(do_GetService("@mozilla.org/accessibilityService;1"));
-  NS_ENSURE_TRUE(accService, NS_ERROR_FAILURE);
-
-  return accService->GetAccessibleInWeakShell(cellElement, mWeakShell,
-                                              aTableCellAccessible);
+  return GetAccService()->GetAccessibleInWeakShell(cellElement, mWeakShell,
+                                                   aTableCellAccessible);
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetCellIndexAt(PRInt32 aRow, PRInt32 aColumn,
                                       PRInt32 *aIndex)
 {
   NS_ENSURE_ARG_POINTER(aIndex);
 
-  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
-
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   nsresult rv = tableLayout->GetIndexByRowAndColumn(aRow, aColumn, aIndex);
   if (rv == NS_TABLELAYOUT_CELL_NOT_FOUND)
     return NS_ERROR_INVALID_ARG;
 
   return NS_OK;
@@ -965,145 +955,158 @@ nsHTMLTableAccessible::GetColumnIndexAt(
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   PRInt32 row;
-  return tableLayout->GetRowAndColumnByIndex(aIndex, &row, aColumn);
+  nsresult rv = tableLayout->GetRowAndColumnByIndex(aIndex, &row, aColumn);
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  return (row == -1 || *aColumn == -1) ? NS_ERROR_INVALID_ARG : NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetRowIndexAt(PRInt32 aIndex, PRInt32 *aRow)
 {
   NS_ENSURE_ARG_POINTER(aRow);
 
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   PRInt32 column;
-  return tableLayout->GetRowAndColumnByIndex(aIndex, aRow, &column);
+  nsresult rv = tableLayout->GetRowAndColumnByIndex(aIndex, aRow, &column);
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  return (*aRow == -1 || column == -1) ? NS_ERROR_INVALID_ARG : NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetColumnExtentAt(PRInt32 aRowIndex,
                                          PRInt32 aColumnIndex,
                                          PRInt32 *aExtentCount)
 {
-  NS_ENSURE_TRUE(IsValidRow(aRowIndex) && IsValidColumn(aColumnIndex),
-                 NS_ERROR_INVALID_ARG);
-
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   nsCOMPtr<nsIDOMElement> domElement;
   PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualRowSpan;
   PRBool isSelected;
 
-  return tableLayout->
+  nsresult rv = tableLayout->
     GetCellDataAt(aRowIndex, aColumnIndex, *getter_AddRefs(domElement),
                   startRowIndex, startColIndex, rowSpan, colSpan,
                   actualRowSpan, *aExtentCount, isSelected);
+
+  return (rv == NS_TABLELAYOUT_CELL_NOT_FOUND) ? NS_ERROR_INVALID_ARG : NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetRowExtentAt(PRInt32 aRowIndex, PRInt32 aColumnIndex,
                                       PRInt32 *aExtentCount)
 {
-  NS_ENSURE_TRUE(IsValidRow(aRowIndex) && IsValidColumn(aColumnIndex),
-                 NS_ERROR_INVALID_ARG);
-
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   nsCOMPtr<nsIDOMElement> domElement;
   PRInt32 startRowIndex, startColIndex, rowSpan, colSpan, actualColSpan;
   PRBool isSelected;
 
-  return tableLayout->
+  nsresult rv = tableLayout->
     GetCellDataAt(aRowIndex, aColumnIndex, *getter_AddRefs(domElement),
                   startRowIndex, startColIndex, rowSpan, colSpan,
                   *aExtentCount, actualColSpan, isSelected);
+
+  return (rv == NS_TABLELAYOUT_CELL_NOT_FOUND) ? NS_ERROR_INVALID_ARG : NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetColumnDescription(PRInt32 aColumn, nsAString &_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::GetRowDescription(PRInt32 aRow, nsAString &_retval)
 {
   return NS_ERROR_NOT_IMPLEMENTED;
 }
 
 NS_IMETHODIMP
-nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *_retval)
+nsHTMLTableAccessible::IsColumnSelected(PRInt32 aColumn, PRBool *aIsSelected)
 {
-  NS_ENSURE_ARG_POINTER(_retval);
+  NS_ENSURE_ARG_POINTER(aIsSelected);
+  *aIsSelected = PR_FALSE;
 
-  NS_ENSURE_TRUE(IsValidColumn(aColumn), NS_ERROR_INVALID_ARG);
-
-  nsresult rv = NS_OK;
-
-  PRInt32 rows;
-  rv = GetRowCount(&rows);
+  PRInt32 colCount = 0;
+  nsresult rv = GetColumnCount(&colCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  for (PRInt32 index = 0; index < rows; index++) {
-    rv = IsCellSelected(index, aColumn, _retval);
-    NS_ENSURE_SUCCESS(rv, rv);
-    if (!*_retval) {
-      break;
+  if (aColumn < 0 || aColumn >= colCount)
+    return NS_ERROR_INVALID_ARG;
+
+  PRInt32 rowCount = 0;
+  rv = GetRowCount(&rowCount);
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  for (PRInt32 rowIdx = 0; rowIdx < rowCount; rowIdx++) {
+    PRBool isSelected = PR_FALSE;
+    rv = IsCellSelected(rowIdx, aColumn, &isSelected);
+    if (NS_SUCCEEDED(rv)) {
+      *aIsSelected = isSelected;
+      if (!isSelected)
+        break;
     }
   }
 
-  return rv;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
-nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *_retval)
+nsHTMLTableAccessible::IsRowSelected(PRInt32 aRow, PRBool *aIsSelected)
 {
-  NS_ENSURE_ARG_POINTER(_retval);
+  NS_ENSURE_ARG_POINTER(aIsSelected);
+  *aIsSelected = PR_FALSE;
 
-  NS_ENSURE_TRUE(IsValidRow(aRow), NS_ERROR_INVALID_ARG);
-
-  nsresult rv = NS_OK;
-
-  PRInt32 columns;
-  rv = GetColumnCount(&columns);
+  PRInt32 rowCount = 0;
+  nsresult rv = GetRowCount(&rowCount);
   NS_ENSURE_SUCCESS(rv, rv);
 
-  for (PRInt32 index = 0; index < columns; index++) {
-    rv = IsCellSelected(aRow, index, _retval);
-    NS_ENSURE_SUCCESS(rv, rv);
-    if (!*_retval) {
-      break;
+  if (aRow < 0 || aRow >= rowCount)
+    return NS_ERROR_INVALID_ARG;
+
+  PRInt32 colCount = 0;
+  rv = GetColumnCount(&colCount);
+  NS_ENSURE_SUCCESS(rv, rv);
+
+  for (PRInt32 colIdx = 0; colIdx < colCount; colIdx++) {
+    PRBool isSelected = PR_FALSE;
+    rv = IsCellSelected(aRow, colIdx, &isSelected);
+    if (NS_SUCCEEDED(rv)) {
+      *aIsSelected = isSelected;
+      if (!isSelected)
+        break;
     }
   }
 
-  return rv;
+  return NS_OK;
 }
 
 NS_IMETHODIMP
 nsHTMLTableAccessible::IsCellSelected(PRInt32 aRow, PRInt32 aColumn,
                                       PRBool *aIsSelected)
 {
   NS_ENSURE_ARG_POINTER(aIsSelected);
   *aIsSelected = PR_FALSE;
 
-  NS_ENSURE_TRUE(IsValidRow(aRow) && IsValidColumn(aColumn),
-                 NS_ERROR_INVALID_ARG);
-
   nsITableLayout *tableLayout = GetTableLayout();
   NS_ENSURE_STATE(tableLayout);
 
   nsCOMPtr<nsIDOMElement> domElement;
   PRInt32 startRowIndex = 0, startColIndex = 0,
           rowSpan, colSpan, actualRowSpan, actualColSpan;
 
   nsresult rv = tableLayout->
@@ -1111,32 +1114,16 @@ nsHTMLTableAccessible::IsCellSelected(PR
                   startRowIndex, startColIndex, rowSpan, colSpan,
                   actualRowSpan, actualColSpan, *aIsSelected);
 
   if (rv == NS_TABLELAYOUT_CELL_NOT_FOUND)
     return NS_ERROR_INVALID_ARG;
   return rv;
 }
 
-PRBool
-nsHTMLTableAccessible::IsValidColumn(PRInt32 aColumn)
-{
-  PRInt32 colCount = 0;
-  nsresult rv = GetColumnCount(&colCount);
-  return NS_SUCCEEDED(rv) && (aColumn >= 0) && (aColumn < colCount);
-}
-
-PRBool
-nsHTMLTableAccessible::IsValidRow(PRInt32 aRow)
-{
-  PRInt32 rowCount = 0;
-  nsresult rv = GetRowCount(&rowCount);
-  return NS_SUCCEEDED(rv) && (aRow >= 0) && (aRow < rowCount);
-}
-
 NS_IMETHODIMP
 nsHTMLTableAccessible::SelectRow(PRInt32 aRow)
 {
   if (IsDefunct())
     return NS_ERROR_FAILURE;
 
   nsresult rv =
     RemoveRowsOrColumnsFromSelection(aRow,
--- a/accessible/src/html/nsHTMLTableAccessible.h
+++ b/accessible/src/html/nsHTMLTableAccessible.h
@@ -139,30 +139,16 @@ public:
   virtual nsresult GetNameInternal(nsAString& aName);
   virtual nsresult GetRoleInternal(PRUint32 *aRole);
   virtual nsresult GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState);
   virtual nsresult GetAttributesInternal(nsIPersistentProperties *aAttributes);
 
   // nsHTMLTableAccessible
 
   /**
-    * Returns true if the column index is in the valid column range.
-    *
-    * @param aColumn  The index to check for validity.
-    */
-  PRBool IsValidColumn(PRInt32 aColumn);
-
-  /**
-    * Returns true if the given index is in the valid row range.
-    *
-    * @param aRow  The index to check for validity.
-    */
-  PRBool IsValidRow(PRInt32 aRow);
-
-  /**
    * Retun cell element at the given row and column index.
    */
   nsresult GetCellAt(PRInt32 aRowIndex, PRInt32 aColIndex,
                      nsIDOMElement* &aCell);
 
   /**
    * Return nsITableLayout for the frame of the accessible table.
    */
--- a/accessible/src/mac/nsRoleMap.h
+++ b/accessible/src/mac/nsRoleMap.h
@@ -159,10 +159,11 @@ static const NSString* AXRoles [] = {
   NSAccessibilityMenuRole,                      // ROLE_COMBOBOX_LIST
   NSAccessibilityMenuItemRole,                  // ROLE_COMBOBOX_OPTION
   NSAccessibilityImageRole,                     // ROLE_IMAGE_MAP
   NSAccessibilityRowRole,                       // ROLE_OPTION
   NSAccessibilityRowRole,                       // ROLE_RICH_OPTION
   NSAccessibilityListRole,                      // ROLE_LISTBOX
   NSAccessibilityUnknownRole,                   // ROLE_FLAT_EQUATION
   NSAccessibilityGroupRole,                     // ROLE_GRID_CELL
+  NSAccessibilityGroupRole,                     // ROLE_EMBEDDED_OBJECT
   @"ROLE_LAST_ENTRY"                            // ROLE_LAST_ENTRY. bogus role that will never be shown (just marks the end of this array)!
 };
--- a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp
+++ b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.cpp
@@ -34,62 +34,116 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 #include "nsHTMLWin32ObjectAccessible.h"
 #include "nsAccessibleWrap.h"
 
+////////////////////////////////////////////////////////////////////////////////
+// nsHTMLWin32ObjectOwnerAccessible
+////////////////////////////////////////////////////////////////////////////////
 
-nsHTMLWin32ObjectOwnerAccessible::nsHTMLWin32ObjectOwnerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell, void* aHwnd):
-nsAccessibleWrap(aNode, aShell)
+nsHTMLWin32ObjectOwnerAccessible::
+  nsHTMLWin32ObjectOwnerAccessible(nsIDOMNode* aNode, nsIWeakReference* aShell,
+                                   void* aHwnd) :
+  nsAccessibleWrap(aNode, aShell)
 {
   mHwnd = aHwnd;
 }
 
+////////////////////////////////////////////////////////////////////////////////
+// nsHTMLWin32ObjectOwnerAccessible: nsAccessNode implementation
+
 nsresult
 nsHTMLWin32ObjectOwnerAccessible::Shutdown()
 {
   nsAccessibleWrap::Shutdown();
   mNativeAccessible = nsnull;
   return NS_OK;
 }
 
-/** 
-  * Our only child is a nsHTMLWin32ObjectAccessible 
-  */
-NS_IMETHODIMP nsHTMLWin32ObjectOwnerAccessible::GetFirstChild(nsIAccessible **aFirstChild)
+////////////////////////////////////////////////////////////////////////////////
+// nsHTMLWin32ObjectOwnerAccessible: nsIAccessible implementation
+
+NS_IMETHODIMP
+nsHTMLWin32ObjectOwnerAccessible::GetFirstChild(nsIAccessible **aFirstChild)
 {
-  *aFirstChild = mNativeAccessible;
+  NS_ENSURE_ARG_POINTER(aFirstChild);
+  *aFirstChild = nsnull;
+
+  // Our only child is a nsHTMLWin32ObjectAccessible object.
   if (!mNativeAccessible) {
-    if (!mHwnd) {
+    if (!mHwnd)
       return NS_OK;
-    }
-    mNativeAccessible = new nsHTMLWin32ObjectAccessible(mHwnd) ;
+
+    mNativeAccessible = new nsHTMLWin32ObjectAccessible(mHwnd);
+    NS_ENSURE_TRUE(mNativeAccessible, NS_ERROR_OUT_OF_MEMORY);
+
     SetFirstChild(mNativeAccessible);
-    *aFirstChild = mNativeAccessible;
   }
+
+  *aFirstChild = mNativeAccessible;
   NS_IF_ADDREF(*aFirstChild);
+
   return NS_OK;
 }
 
-NS_IMETHODIMP nsHTMLWin32ObjectOwnerAccessible::GetLastChild(nsIAccessible **aLastChild)
+NS_IMETHODIMP
+nsHTMLWin32ObjectOwnerAccessible::GetLastChild(nsIAccessible **aLastChild)
 {
   return GetFirstChild(aLastChild);
 }
 
-NS_IMETHODIMP nsHTMLWin32ObjectOwnerAccessible::GetChildCount(PRInt32 *aChildCount)
+NS_IMETHODIMP
+nsHTMLWin32ObjectOwnerAccessible::GetChildCount(PRInt32 *aChildCount)
 {
+  NS_ENSURE_ARG_POINTER(aChildCount);
+
   nsCOMPtr<nsIAccessible> onlyChild;
   GetFirstChild(getter_AddRefs(onlyChild));
   *aChildCount = onlyChild ? 1 : 0;
   return NS_OK;
 }
 
+
+////////////////////////////////////////////////////////////////////////////////
+// nsHTMLWin32ObjectOwnerAccessible: nsAccessible implementation
+
+nsresult
+nsHTMLWin32ObjectOwnerAccessible::GetRoleInternal(PRUint32 *aRole)
+{
+  NS_ENSURE_ARG_POINTER(aRole);
+
+  *aRole = nsIAccessibleRole::ROLE_EMBEDDED_OBJECT;
+  return NS_OK;
+}
+
+nsresult
+nsHTMLWin32ObjectOwnerAccessible::GetStateInternal(PRUint32 *aState,
+                                                   PRUint32 *aExtraState)
+{
+  nsresult rv = nsAccessibleWrap::GetStateInternal(aState, aExtraState);
+  if (rv == NS_OK_DEFUNCT_OBJECT)
+    return rv;
+
+  // XXX: No HWND means this is windowless plugin which is not accessible in
+  // the meantime.
+  if (!mHwnd)
+    *aState = nsIAccessibleStates::STATE_UNAVAILABLE;
+
+  return rv;
+}
+
+
+////////////////////////////////////////////////////////////////////////////////
+// nsHTMLWin32ObjectAccessible
+////////////////////////////////////////////////////////////////////////////////
+
 nsHTMLWin32ObjectAccessible::nsHTMLWin32ObjectAccessible(void* aHwnd):
 nsLeafAccessible(nsnull, nsnull)
 {
   mHwnd = aHwnd;
   if (mHwnd) {
     // The plugin is not windowless. In this situation we use 
     // use its inner child owned by the plugin so that we don't get
     // in an infinite loop, where the WM_GETOBJECT's get forwarded
--- a/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h
+++ b/accessible/src/msaa/nsHTMLWin32ObjectAccessible.h
@@ -59,16 +59,20 @@ public:
   // nsIAccessible
   NS_IMETHOD GetFirstChild(nsIAccessible **aFirstChild);
   NS_IMETHOD GetLastChild(nsIAccessible **aLastChild);
   NS_IMETHOD GetChildCount(PRInt32 *aChildCount);  // Zero or one child
 
   // nsAccessNode
   virtual nsresult Shutdown();
 
+  // nsAccessible
+  virtual nsresult GetRoleInternal(PRUint32 *aRole);
+  virtual nsresult GetStateInternal(PRUint32 *aState, PRUint32 *aExtraState);
+
 protected:
   void* mHwnd;
   nsCOMPtr<nsIAccessible> mNativeAccessible;
 };
 
 /**
   * This class is used only internally, we never! send out an IAccessible linked
   *   back to this object. This class is used to represent a plugin object when
--- a/accessible/src/msaa/nsRoleMap.h
+++ b/accessible/src/msaa/nsRoleMap.h
@@ -435,12 +435,15 @@ static const WindowsRoleMapItem gWindows
   { ROLE_SYSTEM_LIST, ROLE_SYSTEM_LIST },
   
   // nsIAccessibleRole::ROLE_FLAT_EQUATION
   { ROLE_SYSTEM_EQUATION, ROLE_SYSTEM_EQUATION },
   
   // nsIAccessibleRole::ROLE_GRID_CELL
   { ROLE_SYSTEM_CELL, ROLE_SYSTEM_CELL },
 
+  // nsIAccessibleRole::ROLE_EMBEDDED_OBJECT
+  { USE_ROLE_STRING, IA2_ROLE_EMBEDDED_OBJECT },
+
   // nsIAccessibleRole::ROLE_LAST_ENTRY
   { ROLE_WINDOWS_LAST_ENTRY, ROLE_WINDOWS_LAST_ENTRY }
 };
 
--- a/accessible/tests/mochitest/Makefile.in
+++ b/accessible/tests/mochitest/Makefile.in
@@ -84,16 +84,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug420863.html \
 	$(warning   test_childAtPoint.html temporarily disabled) \
 	$(warning	test_childAtPoint.xul temporarily disabled) \
 		test_cssattrs.html \
 		test_descr.html \
 		test_elm_filectrl.html \
 		test_elm_listbox.xul \
 	$(warning   test_elm_media.html temporarily disabled) \
+		test_elm_plugin.html \
 		test_elm_tree.xul \
 		test_elm_txtcntnr.html \
 		test_events_caretmove.html \
 		test_events_coalescence.html \
 		test_events_doc.html \
 		test_events_draganddrop.html \
 		test_events_flush.html \
 		test_events_focus.html \
@@ -154,16 +155,17 @@ include $(topsrcdir)/config/rules.mk
 		test_table_struct.html \
 		test_table_struct_ariagrid.html \
 		test_table_struct_ariatreegrid.html \
 		test_table_struct_listbox.xul \
 		test_table_struct_tree.xul \
 		test_textattrs.html \
 		test_textboxes.html \
 		test_textboxes.xul \
+		test_value.html \
 		test_value.xul \
 		testTextboxes.js \
 		treeview.css \
 		treeview.js \
 		z_states_frame.html \
 		z_states_framearticle.html \
 		z_states_framecheckbox.html \
 		z_states_frametextbox.html \
--- a/accessible/tests/mochitest/role.js
+++ b/accessible/tests/mochitest/role.js
@@ -7,16 +7,17 @@ const ROLE_APP_ROOT = nsIAccessibleRole.
 const ROLE_CAPTION = nsIAccessibleRole.ROLE_CAPTION;
 const ROLE_CELL = nsIAccessibleRole.ROLE_CELL;
 const ROLE_CHROME_WINDOW = nsIAccessibleRole.ROLE_CHROME_WINDOW;
 const ROLE_COMBOBOX = nsIAccessibleRole.ROLE_COMBOBOX;
 const ROLE_COMBOBOX_LIST = nsIAccessibleRole.ROLE_COMBOBOX_LIST;
 const ROLE_COMBOBOX_OPTION = nsIAccessibleRole.ROLE_COMBOBOX_OPTION;
 const ROLE_COLUMNHEADER = nsIAccessibleRole.ROLE_COLUMNHEADER;
 const ROLE_DOCUMENT = nsIAccessibleRole.ROLE_DOCUMENT;
+const ROLE_EMBEDDED_OBJECT = nsIAccessibleRole.ROLE_EMBEDDED_OBJECT;
 const ROLE_ENTRY = nsIAccessibleRole.ROLE_ENTRY;
 const ROLE_FLAT_EQUATION = nsIAccessibleRole.ROLE_FLAT_EQUATION;
 const ROLE_FORM = nsIAccessibleRole.ROLE_FORM;
 const ROLE_GRAPHIC = nsIAccessibleRole.ROLE_GRAPHIC;
 const ROLE_GRID_CELL = nsIAccessibleRole.ROLE_GRID_CELL;
 const ROLE_GROUPING = nsIAccessibleRole.ROLE_GROUPING;
 const ROLE_HEADING = nsIAccessibleRole.ROLE_HEADING;
 const ROLE_IMAGE_MAP = nsIAccessibleRole.ROLE_IMAGE_MAP;
--- a/accessible/tests/mochitest/states.js
+++ b/accessible/tests/mochitest/states.js
@@ -89,20 +89,22 @@ function testStates(aAccOrElmOrID, aStat
 
   // selected/selectable
   if (state & STATE_SELECTED) {
     isState(state & STATE_SELECTABLE, STATE_SELECTABLE, false,
             "Selected element should be selectable!");
   }
 
   // unavailable
-  if ((state & STATE_UNAVAILABLE)
-      && (getRole(aAccOrElmOrID) != ROLE_GROUPING))
-    isState(state & STATE_FOCUSABLE, STATE_FOCUSABLE, false,
-            "Disabled " + id + " must be focusable!");
+  if (state & STATE_UNAVAILABLE) {
+    var role = getRole(aAccOrElmOrID);
+    if (role != ROLE_GROUPING && role != ROLE_EMBEDDED_OBJECT)
+      isState(state & STATE_FOCUSABLE, STATE_FOCUSABLE, false,
+              "Disabled " + id + " must be focusable!");
+  }
 }
 
 /**
  * Tests an acessible and its sub tree for the passed in state bits.
  * Used to make sure that states are propagated to descendants, for example the
  * STATE_UNAVAILABLE from a container to its children.
  *
  * @param aAccOrElmOrID  The accessible, DOM element or ID to be tested.
new file mode 100644
--- /dev/null
+++ b/accessible/tests/mochitest/test_elm_plugin.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<html>
+<head>
+  <title>Plugin tests</title>
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+
+  <script type="application/javascript"
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+
+  <script type="application/javascript"
+          src="chrome://mochikit/content/a11y/accessible/common.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/a11y/accessible/role.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/a11y/accessible/states.js"></script>
+
+  <script type="application/javascript">
+
+    function doTest()
+    {
+      if (!WIN) {
+        ok(true,
+           "Nothing to test because accessible plugins are supported on Windows only");
+
+        SimpleTest.finish();
+        return;
+      }
+
+      testRole("plugin", ROLE_EMBEDDED_OBJECT);
+      testStates("plugin", STATE_UNAVAILABLE);
+
+      SimpleTest.finish();
+    }
+
+    SimpleTest.waitForExplicitFinish();
+    addA11yLoadEvent(doTest);
+  </script>
+</head>
+<body>
+
+  <a target="_blank"
+     title="embed and object HTML tags should be given an accessible role of embedded object"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=485270">Mozilla Bug 485270</a>
+  <p id="display"></p>
+  <div id="content" style="display: none"></div>
+  <pre id="test">
+  </pre>
+
+  <embed id="plugin" type="application/x-test" width="300" height="300"></embed>
+</body>
+</html>
--- a/accessible/tests/mochitest/test_states.html
+++ b/accessible/tests/mochitest/test_states.html
@@ -64,16 +64,40 @@
 
       // test disabled group and all its descendants to see if they are
       // disabled, too. See bug 429285.
       testStatesInSubtree("group", STATE_UNAVAILABLE);
 
       // offscreen test
       testStates("aria_offscreen_textbox", STATE_OFFSCREEN);
 
+      //
+      // This section tests aria roles on links/anchors for underlying
+      // nsHTMLLinkAccessible creation. (see closed bug 494807)
+      //
+
+      // strong roles
+      testStates("aria_menuitem_link", 0, 0, STATE_LINKED);
+      testStates("aria_button_link", 0, 0, STATE_LINKED);
+      testStates("aria_checkbox_link", 0, 0, STATE_LINKED);
+
+      // strong landmark
+      testStates("aria_application_link", 0, 0, STATE_LINKED);
+      testStates("aria_application_anchor", 0, 0, STATE_SELECTABLE);
+
+      // strange cases
+      testStates("aria_link_link", STATE_LINKED);
+      testStates("aria_link_anchor", STATE_SELECTABLE);
+
+      // some weak landmarks
+      testStates("aria_main_link", STATE_LINKED);
+      testStates("aria_navigation_link", STATE_LINKED);
+      testStates("aria_main_anchor", STATE_SELECTABLE);
+      testStates("aria_navigation_anchor", STATE_SELECTABLE);
+
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
 
 </head>
@@ -135,10 +159,29 @@
       <div role="option" id="item4">Item 4</div>
     </div>
     <div role="slider" tabindex="0">A slider</div>
   </div>
   
   <div id="offscreen_log" role="log" class="offscreen">
     <div id="aria_offscreen_textbox" role="textbox" aria-readonly="true">This text should be offscreen</div>
   </div>
+
+  <a id="aria_menuitem_link" role="menuitem" href="foo">menuitem</a>
+  <a id="aria_button_link" role="button" href="foo">button</a>
+  <a id="aria_checkbox_link" role="checkbox" href="foo">checkbox</a>
+
+  <!-- strange edge case: please don't do this in the wild -->
+  <a id="aria_link_link" role="link" href="foo">link</a>
+  <a id="aria_link_anchor" role="link" name="link_anchor">link</a>
+
+  <!-- landmarks: links -->
+  <a id="aria_application_link" role="application" href="foo">app</a>
+  <a id="aria_main_link" role="main" href="foo">main</a>
+  <a id="aria_navigation_link" role="navigation" href="foo">nav</a>
+  
+  <!-- landmarks: anchors -->
+  <a id="aria_application_anchor" role="application" name="app_anchor">app</a>
+  <a id="aria_main_anchor" role="main" name="main_anchor">main</a>
+  <a id="aria_navigation_anchor" role="navigation" name="nav_anchor">nav</a>
+
 </body>
 </html>
--- a/accessible/tests/mochitest/test_table_sels.html
+++ b/accessible/tests/mochitest/test_table_sels.html
@@ -17,16 +17,19 @@
           src="chrome://mochikit/content/a11y/accessible/states.js"></script>
   <script type="application/javascript"
           src="chrome://mochikit/content/a11y/accessible/table.js"></script>
 
   <script type="text/javascript">
 
     function doTest()
     {
+      //////////////////////////////////////////////////////////////////////////
+      // table
+
       var cellsArray =
       [
         [false, false,       false,       kColSpanned, false, false,       false, false],
         [false, false,       false,       false,       false, false,       false, kRowSpanned],
         [false, false,       kColSpanned, false,       false, false,       false, kRowSpanned],
         [false, kRowSpanned, kSpanned,    false,       false, kRowSpanned, false, kRowSpanned]
       ];
 
@@ -48,16 +51,30 @@
       for (var colIdx = 0; colIdx < columsCount; colIdx++) {
         testSelectTableColumn("table", colIdx, cellsArray);
         testUnselectTableColumn("table", colIdx, cellsArray);
       }
 
       var accTable = getAccessible("table", [nsIAccessibleTable]);
       ok(!accTable.isProbablyForLayout(), "table is not for layout");
 
+      //////////////////////////////////////////////////////////////////////////
+      // table instane
+
+      cellsArray =
+      [
+        [false,       false, false,       -1,          -1],
+        [false,       false, false,       -1,          -1],
+        [false,       false, kColSpanned, kColSpanned, -1],
+        [kRowSpanned, false, false,       -1,          -1],
+        [kRowSpanned, false, kRowSpanned, false,       false]
+      ];
+
+      testTableSelection("tableinsane", cellsArray);
+
       SimpleTest.finish();
     }
 
     SimpleTest.waitForExplicitFinish();
     addA11yLoadEvent(doTest);
   </script>
  </head>
  <body>
@@ -72,16 +89,21 @@
      title="nsHTMLTableAccessible::GetSelectedCells contains index duplicates for spanned rows or columns">
     Mozilla Bug 501635
   </a>
   <a target="_blank"
      href="https://bugzilla.mozilla.org/show_bug.cgi?id=417929"
      title="nsIAccessiblTable selectRows does not unselect previously selected rows">
     Mozilla Bug 417929
   </a>
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=501659"
+     title="HTML table's isRowSelected/isColumnSelected shouldn't fail if row or column has cell holes">
+    Mozilla Bug 501659
+  </a>
 
   <p id="display"></p>
   <div id="content" style="display: none"></div>
   <pre id="test">
   </pre>
 
   <!-- Test Table -->
   <br><br><b> Testing Table:</b><br><br>
@@ -117,11 +139,42 @@
      <tr>
       <td><br></td>
       <td><br></td>
       <td><br></td>
       <td><br></td>
      </tr>
     </tbody>
    </table>
+
+   <table border="1" id="tableinsane">
+    <thead>
+     <tr>
+      <th>col1</th>
+      <th>col2</th>
+      <th>col3</th>
+     </tr>
+    </thead>
+     <tbody>
+      <tr>
+       <td>1</td>
+       <td>2</td>
+       <td>3</td>
+      </tr>
+      <tr>
+       <td rowspan="3">4</td>
+       <td colspan="4">5</td>
+      </tr>
+      <tr>
+       <td>6</td>
+       <td rowspan="2">7</td>
+      </tr>
+      <tr>
+       <td>8</td>
+       <td>9</td>
+       <td>10</td>
+      </tr>
+     </tbody>
+    </table>
+
   </center>
  </body>
 </html>
new file mode 100644
--- /dev/null
+++ b/accessible/tests/mochitest/test_value.html
@@ -0,0 +1,81 @@
+<html>
+
+<head>
+  <title>nsIAccessible value testing</title>
+
+  <link rel="stylesheet" type="text/css"
+        href="chrome://mochikit/content/tests/SimpleTest/test.css" />
+
+  <style type="text/css">
+    .offscreen {
+      position: absolute;
+      left: -5000px;
+      top: -5000px;
+      height: 100px;
+      width: 100px;
+    }
+  </style>
+
+  <script type="application/javascript"
+          src="chrome://mochikit/content/MochiKit/packed.js"></script>
+  <script type="application/javascript"
+          src="chrome://mochikit/content/tests/SimpleTest/SimpleTest.js"></script>
+
+  <script type="application/javascript"
+          src="chrome://mochikit/content/a11y/accessible/common.js"></script>
+
+  <script type="application/javascript">
+    function doTest()
+    {
+      function testValue(aID, aValue)
+      {
+        var acc = getAccessible(aID);
+        if (!acc)
+          return;
+        is(acc.value, aValue, "Wrong value for " + aID + "!");
+      }
+
+      var href = "chrome://mochikit/content/a11y/accessible/foo";
+
+      // roles that can't live as nsHTMLLinkAccessibles
+      testValue("aria_menuitem_link", "");
+      testValue("aria_button_link", "");
+      testValue("aria_checkbox_link", "");
+      testValue("aria_application_link", "");
+
+      // roles that can live as nsHTMLLinkAccessibles
+      testValue("aria_link_link", href);
+      testValue("aria_main_link", href);
+      testValue("aria_navigation_link", href);
+
+      SimpleTest.finish();
+    }
+
+    SimpleTest.waitForExplicitFinish();
+    addA11yLoadEvent(doTest);
+  </script>
+
+</head>
+
+<body>
+
+  <a target="_blank"
+     href="https://bugzilla.mozilla.org/show_bug.cgi?id=494807"
+     title="Do not expose a11y info specific to hyperlinks when role is overridden using ARIA">
+    Mozilla Bug 494807
+  </a><br />
+
+  <a id="aria_menuitem_link" role="menuitem" href="foo">menuitem</a>
+  <a id="aria_button_link" role="button" href="foo">button</a>
+  <a id="aria_checkbox_link" role="checkbox" href="foo">checkbox</a>
+
+  <!-- landmark links -->
+  <a id="aria_application_link" role="application" href="foo">app</a>
+  <a id="aria_main_link" role="main" href="foo">main</a>
+  <a id="aria_navigation_link" role="navigation" href="foo">nav</a>
+  
+  <!-- strange edge case: please don't do this in the wild -->
+  <a id="aria_link_link" role="link" href="foo">link</a>
+
+</body>
+</html>
--- a/browser/app/Makefile.in
+++ b/browser/app/Makefile.in
@@ -293,19 +293,16 @@ endif
 
 ifdef WINCE
 ifdef MOZ_FASTSTART
 libs::
 	cp -f $(DIST)/bin/faststartstub.exe $(DIST)/bin/$(MOZ_APP_NAME)faststart.exe
 endif
 endif
 
-libs::
-	touch $(DIST)/bin/.autoreg
-
 libs:: $(srcdir)/profile/prefs.js
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin/defaults/profile
 
 libs:: $(srcdir)/blocklist.xml
 	$(INSTALL) $(IFLAGS1) $^ $(DIST)/bin
 
 ifeq (cocoa,$(MOZ_WIDGET_TOOLKIT))
 
--- a/browser/app/profile/firefox.js
+++ b/browser/app/profile/firefox.js
@@ -333,17 +333,16 @@ pref("browser.tabs.autoHide", false);
 pref("browser.tabs.autoHide", true);
 #endif
 pref("browser.tabs.closeWindowWithLastTab", true);
 pref("browser.tabs.insertRelatedAfterCurrent", true);
 pref("browser.tabs.warnOnClose", true);
 pref("browser.tabs.warnOnOpen", true);
 pref("browser.tabs.maxOpenBeforeWarn", 15);
 pref("browser.tabs.loadInBackground", true);
-pref("browser.tabs.loadFolderAndReplace", true);
 pref("browser.tabs.opentabfor.middleclick", true);
 pref("browser.tabs.loadDivertedInBackground", false);
 pref("browser.tabs.loadBookmarksInBackground", false);
 pref("browser.tabs.tabMinWidth", 100);
 pref("browser.tabs.tabMaxWidth", 250);
 pref("browser.tabs.tabClipWidth", 140);
 
 // Where to show tab close buttons:
--- a/browser/base/content/aboutSupport.xhtml
+++ b/browser/base/content/aboutSupport.xhtml
@@ -139,26 +139,19 @@ window.onload = function () {
   let Application = Cc["@mozilla.org/fuel/application;1"]
                       .getService(Ci.fuelIApplication);
 
   // Get the support URL.
   let urlFormatter = Cc["@mozilla.org/toolkit/URLFormatterService;1"]
                        .getService(Ci.nsIURLFormatter);
   let supportUrl = urlFormatter.formatURLPref("app.support.baseURL");
 
-  // Get the profile directory.
-  let propertiesService = Cc["@mozilla.org/file/directory_service;1"]
-                            .getService(Ci.nsIProperties);
-  let currProfD = propertiesService.get("ProfD", Ci.nsIFile);
-  let profileDir = currProfD.path;
-
   // Update the application basics section.
   document.getElementById("application-box").textContent = Application.name;
   document.getElementById("version-box").textContent = Application.version;
-  document.getElementById("profile-box").textContent = profileDir;
   document.getElementById("supportLink").href = supportUrl;
 
   // Update the other sections.
   populateExtensionsSection();
   populatePreferencesSection();
 }
 
 function populateExtensionsSection() {
@@ -326,16 +319,29 @@ function generateTextForTextNode(node, i
     textFragmentAccumulator.push("\n" + indent);
 
   // Trim the text node's text content and add proper indentation after 
   // any internal line breaks.  
   let text = node.textContent.trim().replace("\n[ \t]*", "\n" + indent);
   textFragmentAccumulator.push(text);
 }
 
+function openProfileDirectory() {
+  // Get the profile directory.
+  let propertiesService = Cc["@mozilla.org/file/directory_service;1"]
+                            .getService(Ci.nsIProperties);
+  let currProfD = propertiesService.get("ProfD", Ci.nsIFile);
+  let profileDir = currProfD.path;
+
+  // Show the profile directory.
+  let nsLocalFile = Components.Constructor("@mozilla.org/file/local;1",
+                                           "nsILocalFile", "initWithPath");
+  new nsLocalFile(profileDir).reveal();
+}
+
     ]]></script>
 
   </head>
 
   <body dir="&locale.dir;">
 
     <h1>
       &aboutSupport.pageTitle;
@@ -379,20 +385,27 @@ function generateTextForTextNode(node, i
             </td>
           </tr>
             
           <tr>
             <th class="column">
               &aboutSupport.appBasicsProfileDir;
             </th>
 
-            <td id="profile-box">
+            <td>
+              <button onclick="openProfileDirectory()">
+#ifdef XP_MACOSX
+                &aboutSupport.showMac.label;
+#else
+                &aboutSupport.show.label;
+#endif
+               </button>
             </td>
           </tr>
-            
+
           <tr>
             <th class="column">
               &aboutSupport.appBasicsPlugins;
             </th>
 
             <td>
               <a href="about:plugins">about:plugins</a>
             </td>
--- a/browser/base/content/browser.js
+++ b/browser/base/content/browser.js
@@ -215,18 +215,23 @@ function SetClickAndHoldHandlers() {
 
     timer = setTimeout(timerCallback, 500, aEvent.currentTarget);
   }
 
   function clickHandler(aEvent) {
     if (aEvent.button == 0 &&
         aEvent.target == aEvent.currentTarget &&
         !aEvent.currentTarget.open &&
-        !aEvent.currentTarget.disabled)
-      aEvent.currentTarget.doCommand();
+        !aEvent.currentTarget.disabled) {
+      let cmdEvent = document.createEvent("xulcommandevent");
+      cmdEvent.initCommandEvent("command", true, true, window, 0,
+                                aEvent.ctrlKey, aEvent.altKey, aEvent.shiftKey,
+                                aEvent.metaKey, null);
+      aEvent.currentTarget.dispatchEvent(cmdEvent);
+    }
   }
 
   function stopTimer(aEvent) {
     if (timer) {
       clearTimeout(timer);
       timer = null;
     }
   }
@@ -781,78 +786,76 @@ let gGestureSupport = {
    *
    * @param aArray
    *        Source array containing any number of elements
    * @yield Array that is a subset of the input array from full set to empty
    */
   _power: function GS__power(aArray) {
     // Create a bitmask based on the length of the array
     let num = 1 << aArray.length;
-    while (--num >= 0)
+    while (--num >= 0) {
       // Only select array elements where the current bit is set
-      yield aArray.reduce(function(aPrev, aCurr, aIndex) {
+      yield aArray.reduce(function (aPrev, aCurr, aIndex) {
         if (num & 1 << aIndex)
           aPrev.push(aCurr);
         return aPrev;
       }, []);
+    }
   },
 
   /**
    * Determine what action to do for the gesture based on which keys are
    * pressed and which commands are set
    *
    * @param aEvent
    *        The original gesture event to convert into a fake click event
    * @param aGesture
    *        Array of gesture name parts (to be joined by periods)
    * @return Name of the command found for the event's keys and gesture. If no
    *         command is found, no value is returned (undefined).
    */
   _doAction: function GS__doAction(aEvent, aGesture) {
-    // Create a fake event that pretends the gesture is a button click
-    let fakeEvent = { shiftKey: aEvent.shiftKey, ctrlKey: aEvent.ctrlKey,
-      metaKey: aEvent.metaKey, altKey: aEvent.altKey, button: 0 };
-
     // Create an array of pressed keys in a fixed order so that a command for
     // "meta" is preferred over "ctrl" when both buttons are pressed (and a
     // command for both don't exist)
     let keyCombos = [];
-    const keys = ["shift", "alt", "ctrl", "meta"];
-    for each (let key in keys)
+    ["shift", "alt", "ctrl", "meta"].forEach(function (key) {
       if (aEvent[key + "Key"])
         keyCombos.push(key);
-
-    try {
-      // Try each combination of key presses in decreasing order for commands
-      for (let subCombo in this._power(keyCombos)) {
-        // Convert a gesture and pressed keys into the corresponding command
-        // action where the preference has the gesture before "shift" before
-        // "alt" before "ctrl" before "meta" all separated by periods
-        let command = this._getPref(aGesture.concat(subCombo).join("."));
-
-        // Do the command if we found one to do
-        if (command) {
-          let node = document.getElementById(command);
-          // Use the command element if it exists
-          if (node && node.hasAttribute("oncommand")) {
-            // XXX: Use node.oncommand(event) once bug 246720 is fixed
-            if (node.getAttribute("disabled") != "true")
-              new Function("event", node.getAttribute("oncommand")).
-                call(node, fakeEvent);
-          }
-          // Otherwise it should be a "standard" command
-          else
-            goDoCommand(command);
-
-          return command;
+    });
+
+    // Try each combination of key presses in decreasing order for commands
+    for each (let subCombo in this._power(keyCombos)) {
+      // Convert a gesture and pressed keys into the corresponding command
+      // action where the preference has the gesture before "shift" before
+      // "alt" before "ctrl" before "meta" all separated by periods
+      let command;
+      try {
+        command = this._getPref(aGesture.concat(subCombo).join("."));
+      } catch (e) {}
+
+      if (!command)
+        continue;
+
+      let node = document.getElementById(command);
+      if (node) {
+        if (node.getAttribute("disabled") != "true") {
+          let cmdEvent = document.createEvent("xulcommandevent");
+          cmdEvent.initCommandEvent("command", true, true, window, 0,
+                                    aEvent.ctrlKey, aEvent.altKey, aEvent.shiftKey,
+                                    aEvent.metaKey, null);
+          node.dispatchEvent(cmdEvent);
         }
+      } else {
+        goDoCommand(command);
       }
-    }
-    // The generator ran out of key combinations, so just do nothing
-    catch (e) {}
+
+      return command;
+    }
+    return null;
   },
 
   /**
    * Convert continual motion events into an action if it exceeds a threshold
    * in a given direction. This function will be set by _setupGesture to
    * capture state that needs to be shared across multiple gesture updates.
    *
    * @param aEvent
--- a/browser/base/content/test/browser_bug386835.js
+++ b/browser/base/content/test/browser_bug386835.js
@@ -1,14 +1,14 @@
 var gTestPage = "http://example.org/browser/browser/base/content/test/dummy_page.html";
 var gTestImage = "http://example.org/browser/browser/base/content/test/moz.png";
 var gTab1, gTab2, gTab3;
 var gLevel;
-const kBack = 0;
-const kForward = 1;
+const BACK = 0;
+const FORWARD = 1;
 
 function test() {
   waitForExplicitFinish();
 
   gTab1 = gBrowser.addTab(gTestPage);
   gTab2 = gBrowser.addTab();
   gTab3 = gBrowser.addTab();
   gBrowser.selectedTab = gTab1;
@@ -54,18 +54,18 @@ function imageLoaded() {
   zoomTest(gTab1, 1, "Zoom should be 1 when image was loaded in the background");
   gBrowser.selectedTab = gTab1;
   zoomTest(gTab1, 1, "Zoom should still be 1 when tab with image is selected");
 
   executeSoon(imageZoomSwitch);
 }
 
 function imageZoomSwitch() {
-  navigate(kBack, function() {
-    navigate(kForward, function() {
+  navigate(BACK, function () {
+    navigate(FORWARD, function () {
       zoomTest(gTab1, 1, "Tab 1 should not be zoomed when an image loads");
       gBrowser.selectedTab = gTab2;
       zoomTest(gTab1, 1, "Tab 1 should still not be zoomed when deselected");
 
       // Mac OS X does not support print preview, so skip those tests
       let isOSX = ("nsILocalFileMac" in Components.interfaces);
       if (isOSX)
         finishTest();
@@ -111,19 +111,19 @@ function testPrintPreview(aTab, aCallbac
     PrintPreviewListener.onExit.apply(PrintPreviewListener, arguments);
 
     zoomTest(aTab, level, "Toggling print preview mode should not affect zoom level");
 
     FullZoom.reset();
     aCallback();
   };
 
-  let printPreview = new Function(document.getElementById("cmd_printPreview")
-                                          .getAttribute("oncommand"));
-  executeSoon(printPreview);
+  executeSoon(function () {
+    document.getElementById("cmd_printPreview").doCommand();
+  });
 }
 
 function finishTest() {
   gBrowser.selectedTab = gTab1;
   FullZoom.reset();
   gBrowser.removeTab(gTab1);
   FullZoom.reset();
   gBrowser.removeTab(gTab2);
@@ -140,17 +140,17 @@ function load(tab, url, cb) {
   tab.linkedBrowser.addEventListener("load", function (event) {
     event.currentTarget.removeEventListener("load", arguments.callee, true);
     cb();
   }, true);
   tab.linkedBrowser.loadURI(url);
 }
 
 function navigate(direction, cb) {
-  gBrowser.addEventListener("pageshow", function(event) {
+  gBrowser.addEventListener("pageshow", function (event) {
     gBrowser.removeEventListener("pageshow", arguments.callee, true);
-    setTimeout(cb, 0);
+    executeSoon(cb);
   }, true);
-  if (direction == kBack)
+  if (direction == BACK)
     gBrowser.goBack();
-  else if (direction == kForward)
+  else if (direction == FORWARD)
     gBrowser.goForward();
 }
--- a/browser/base/content/test/browser_bug416661.js
+++ b/browser/base/content/test/browser_bug416661.js
@@ -21,16 +21,17 @@ function continue_test_prefNotSet () {
   is(ZoomManager.zoom, 1, "zoom level pref should not apply to an image");
   FullZoom.reset();
 
   content.location = 
     "http://localhost:8888/browser/browser/base/content/test/zoom_test.html";
 }
 
 function end_test_prefNotSet() {
+  tabElm.linkedBrowser.removeEventListener("load", end_test_prefNotSet, true);
   is(ZoomManager.zoom, zoomLevel, "the zoom level should have persisted");
 
   // Reset the zoom so that other tests have a fresh zoom level
   FullZoom.reset();
   gBrowser.removeCurrentTab();
   finish();
 }
 
--- a/browser/base/content/test/browser_bug427559.js
+++ b/browser/base/content/test/browser_bug427559.js
@@ -44,16 +44,17 @@
 let testPage = 'data:text/html,<body><button onblur="this.parentNode.removeChild(this);"><script>document.body.firstChild.focus();</script></body>';
 
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
 
   gBrowser.selectedBrowser.addEventListener("load", function () {
+    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     setTimeout(function () {
       var testPageWin = content;
 
       // The test page loaded, so open an empty tab, select it, then restore
       // the test tab. This causes the test page's focused element to be removed
       // from its document.
       gBrowser.selectedTab = gBrowser.addTab();
       gBrowser.removeCurrentTab();
--- a/browser/base/content/test/browser_bug432599.js
+++ b/browser/base/content/test/browser_bug432599.js
@@ -41,16 +41,17 @@ function test() {
 
   content.location = testURL;
 }
 
 let invokers = [invokeUsingStarButton, invokeUsingCtrlD];
 let currentInvoker = 0;
 
 function initTest() {
+  gBrowser.selectedBrowser.removeEventListener("load", initTest, true);
   // first, bookmark the page
   Application.bookmarks.toolbar.addBookmark("Bug 432599 Test", makeURI(testURL));
 
   checkBookmarksPanel(invokers[currentInvoker], 1);
 }
 
 let initialValue;
 let initialRemoveHidden;
--- a/browser/base/content/test/browser_bug435035.js
+++ b/browser/base/content/test/browser_bug435035.js
@@ -1,13 +1,14 @@
 function test() {
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
   gBrowser.selectedBrowser.addEventListener("load", function () {
+    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
     is(document.getElementById("identity-box").className,
        gIdentityHandler.IDENTITY_MODE_MIXED_CONTENT,
        "identity box has class name for mixed content");
 
     gBrowser.removeCurrentTab();
     finish();
   }, true);
 
--- a/browser/base/content/test/browser_bug477014.js
+++ b/browser/base/content/test/browser_bug477014.js
@@ -44,37 +44,35 @@ function test() {
 
   var newWindow;
   var tabToDetach;
 
   function onPageShow(event) {
     // we get here if the test is executed before the pageshow
     // event for the window's first tab
     if (!tabToDetach ||
-         tabToDetach.linkedBrowser.contentDocument != event.target) {
-        return;
-    }
+        tabToDetach.linkedBrowser.contentDocument != event.target)
+      return;
 
     if (!newWindow) {
-      var pageShowFunc = arguments.callee;
-      gBrowser.removeEventListener("pageshow", pageShowFunc, false);
+      gBrowser.removeEventListener("pageshow", onPageShow, false);
 
       // prepare the tab (set icon and busy state)
       // we have to set these only after onState* notification, otherwise
       // they're overriden
       setTimeout(function() {
         gBrowser.setIcon(tabToDetach, iconURLSpec);
         tabToDetach.setAttribute("busy", "true");
 
         // detach and set the listener on the new window
         newWindow = gBrowser.replaceTabWithWindow(tabToDetach);
         // wait for gBrowser to come along
         function onLoad(event) {
           newWindow.gBrowser
-                   .addEventListener("pageshow", pageShowFunc, false);
+                   .addEventListener("pageshow", onPageShow, false);
           newWindow.removeEventListener("load", arguments.callee, false);
         }
         newWindow.addEventListener("load", onLoad, false);
       }, 0);
       return;
     }
 
     is(newWindow.gBrowser.selectedTab.hasAttribute("busy"), true);
--- a/browser/base/content/test/browser_discovery.js
+++ b/browser/base/content/test/browser_discovery.js
@@ -1,24 +1,21 @@
-var gBrowserHandler;
+var currentHandler;
 var browser;
 
 function doc() browser.contentDocument;
 
 function setHandlerFunc(aResultFunc) {
-  DOMLinkHandler.handleEvent = function (event) {
-    gBrowserHandler.call(DOMLinkHandler, event);
-    aResultFunc();
-  }
+  if (currentHandler)
+    gBrowser.removeEventListener("DOMLinkAdded", currentHandler, false);
+  gBrowser.addEventListener("DOMLinkAdded", aResultFunc, false);
+  currentHandler = aResultFunc;
 }
 
 function test() {
-  gBrowserHandler = DOMLinkHandler.handleEvent;
-  ok(gBrowserHandler, "found browser handler");
-
   waitForExplicitFinish();
 
   gBrowser.selectedTab = gBrowser.addTab();
   browser = gBrowser.selectedBrowser;
   browser.addEventListener("load", function (event) {
     event.currentTarget.removeEventListener("load", arguments.callee, true);
     iconDiscovery();
   }, true);
@@ -115,20 +112,17 @@ function runMultipleEnginesTestAndFinali
     ranOnce = true;
     return;
   }
   ok(browser.engines, "has engines");
   is(browser.engines.length, 1, "only one engine");
   is(browser.engines[0].uri, "http://first.mozilla.com/search.xml", "first engine wins");
 
   gBrowser.removeCurrentTab();
-
-  // Reset the default link handler
-  DOMLinkHandler.handleEvent = gBrowserHandler;
-
+  gBrowser.removeEventListener("DOMLinkAdded", currentHandler, false);
   finish();
 }
 
 function searchDiscovery() {
   var head = doc().getElementById("linkparent");
 
   if (searchDiscoveryTests.length) {
     setHandlerFunc(runSearchDiscoveryTest);
--- a/browser/base/content/test/browser_pageInfo.js
+++ b/browser/base/content/test/browser_pageInfo.js
@@ -1,25 +1,29 @@
+var obs = Cc["@mozilla.org/observer-service;1"].getService(Ci.nsIObserverService);
+
 function test() {
   waitForExplicitFinish();
 
-  var pageInfo, obs, atTest = 0;
-  var gTestPage = gBrowser.addTab();
-  gBrowser.selectedTab = gTestPage;
-  gTestPage.linkedBrowser.addEventListener("load", handleLoad, true);
+  var pageInfo, atTest = 0;
+  gBrowser.selectedTab = gBrowser.addTab();
+  gBrowser.selectedBrowser.addEventListener("load", function () {
+    gBrowser.selectedBrowser.removeEventListener("load", arguments.callee, true);
+    pageInfo = BrowserPageInfo();
+    obs.addObserver(observer, "page-info-dialog-loaded", false);
+  }, true);
   content.location =
     "https://example.com/browser/browser/base/content/test/feed_tab.html";
-  gTestPage.focus();
 
   var observer = {
     observe: function(win, topic, data) {
       if (topic != "page-info-dialog-loaded")
         return;
 
-      switch(atTest) {
+      switch (atTest) {
         case 0:
           atTest++;
           handlePageInfo();
           break;
         case 1:
           atTest++;
           pageInfo = win;
           testLockClick();
@@ -28,24 +32,16 @@ function test() {
           atTest++;
           obs.removeObserver(observer, "page-info-dialog-loaded");
           testLockDoubleClick();
           break;
       }
     }
   }
 
-  function handleLoad() {
-
-    pageInfo = BrowserPageInfo();
-    obs = Components.classes["@mozilla.org/observer-service;1"]
-            .getService(Components.interfaces.nsIObserverService);
-      obs.addObserver(observer, "page-info-dialog-loaded", false);
-  }
-
   function $(aId) { return pageInfo.document.getElementById(aId) };
 
   function handlePageInfo() {
     var feedTab = $("feedTab");
     var feedListbox = $("feedListbox");
 
     ok(feedListbox, "Feed list is null (feeds tab is broken)");
 
@@ -77,23 +73,22 @@ function test() {
       var lockIcon = document.getElementById("security-button");
       EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 1});
       EventUtils.synthesizeMouse(lockIcon, 0, 0, {clickCount: 2});
     }, false);
     pageInfo.close();
   }
 
   function testLockDoubleClick() {
-    var pageInfoDialogs = Components.classes["@mozilla.org/appshell/window-mediator;1"]
-                                    .getService(Components.interfaces.nsIWindowMediator)
-                                    .getEnumerator("Browser:page-info");
+    var pageInfoDialogs = Cc["@mozilla.org/appshell/window-mediator;1"]
+                            .getService(Ci.nsIWindowMediator)
+                            .getEnumerator("Browser:page-info");
     var i = 0;
-    while(pageInfoDialogs.hasMoreElements()) {
+    while (pageInfoDialogs.hasMoreElements()) {
       i++;
       pageInfo = pageInfoDialogs.getNext();
       pageInfo.close();
     }
     is(i, 1, "When the lock is clicked twice there should be only one page info dialog");
-    gTestPage.focus();
     gBrowser.removeCurrentTab();
     finish();
   }
 }
--- a/browser/base/content/utilityOverlay.js
+++ b/browser/base/content/utilityOverlay.js
@@ -372,20 +372,18 @@ function openAboutDialog()
 {
 #ifdef XP_MACOSX
   var wm = Components.classes["@mozilla.org/appshell/window-mediator;1"]
                      .getService(Components.interfaces.nsIWindowMediator);
   var win = wm.getMostRecentWindow("Browser:About");
   if (win)
     win.focus();
   else {
-    // XXXmano: define minimizable=no although it does nothing on OS X
-    // (see Bug 287162); remove this comment once Bug 287162 is fixed...
-    window.open("chrome://browser/content/aboutDialog.xul", "About",
-                "chrome, resizable=no, minimizable=no");
+    window.openDialog("chrome://browser/content/aboutDialog.xul", "About",
+                      "chrome, resizable=no, minimizable=no");
   }
 #else
   window.openDialog("chrome://browser/content/aboutDialog.xul", "About", "centerscreen,chrome,resizable=no");
 #endif
 }
 
 function openPreferences(paneID, extraArgs)
 {
--- a/browser/components/migration/src/nsOperaProfileMigrator.cpp
+++ b/browser/components/migration/src/nsOperaProfileMigrator.cpp
@@ -879,17 +879,19 @@ nsOperaCookieMigrator::AddCookieOverride
   nsCOMPtr<nsIURI> uri(do_CreateInstance("@mozilla.org/network/standard-url;1"));
   if (!uri)
     return NS_ERROR_OUT_OF_MEMORY;
   uri->SetHost(domain);
 
   rv = aManager->Add(uri, "cookie",
                      (mCurrHandlingInfo == 1 || mCurrHandlingInfo == 3)
                      ? (PRUint32) nsIPermissionManager::ALLOW_ACTION
-                     : (PRUint32) nsIPermissionManager::DENY_ACTION);
+                     : (PRUint32) nsIPermissionManager::DENY_ACTION,
+                     nsIPermissionManager::EXPIRE_NEVER,
+                     0);
 
   mCurrHandlingInfo = 0;
 
   return rv;
 }
 
 
 nsresult
--- a/browser/components/places/tests/perf/Makefile.in
+++ b/browser/components/places/tests/perf/Makefile.in
@@ -45,20 +45,21 @@ include $(DEPTH)/config/autoconf.mk
 include $(topsrcdir)/config/rules.mk
 
 _CHROME_FILES = \
 	perf_large_delete.xul \
 	$(NULL)
 
 # Disabled due to bad interactions with next tests.
 # browser_ui_locationbar.js
+# Disabled due to random failures.
+# browser_ui_bookmarks_sidebar.js
 _BROWSER_TEST_FILES = \
 	browser_ui_000_data.js \
 	browser_ui_history_menu.js \
-	browser_ui_bookmarks_sidebar.js \
 	browser_ui_history_sidebar.js \
 	browser_ui_history_sidebar_2.js \
 	browser_ui_history_sidebar_3.js \
 	$(NULL)
 
 libs:: $(_CHROME_FILES)
 	$(INSTALL) $(foreach f,$^,"$f") $(DEPTH)/_tests/testing/mochitest/chrome/$(relativesrcdir)
 
--- a/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml
+++ b/browser/components/privatebrowsing/content/aboutPrivateBrowsing.xhtml
@@ -46,90 +46,88 @@
   <!ENTITY % browserDTD SYSTEM "chrome://browser/locale/browser.dtd">
   %browserDTD;
   <!ENTITY % privatebrowsingpageDTD SYSTEM "chrome://browser/locale/aboutPrivateBrowsing.dtd">
   %privatebrowsingpageDTD;
 ]>
 
 <html xmlns="http://www.w3.org/1999/xhtml">
   <head>
-#ifdef XP_MACOSX
-    <title></title>
-#else
-    <title>&privatebrowsingpage.title;</title>
-#endif
     <link rel="stylesheet" href="chrome://global/skin/netError.css" type="text/css" media="all"/>
     <link rel="stylesheet" href="chrome://browser/skin/aboutPrivateBrowsing.css" type="text/css" media="all"/>
     <script type="application/x-javascript;version=1.7"><![CDATA[
       const Cc = Components.classes;
       const Ci = Components.interfaces;
 
-      window.__defineGetter__("mainWindow", function() {
-        delete window.mainWindow;
-        return window.mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
-                                         .getInterface(Ci.nsIWebNavigation)
-                                         .QueryInterface(Ci.nsIDocShellTreeItem)
-                                         .rootTreeItem
-                                         .QueryInterface(Ci.nsIInterfaceRequestor)
-                                         .getInterface(Ci.nsIDOMWindow);
-      });
+      var pb = Cc["@mozilla.org/privatebrowsing;1"].
+               getService(Ci.nsIPrivateBrowsingService);
+
+      if (!pb.privateBrowsingEnabled) {
+        document.title = "]]>&privatebrowsingpage.title.normal;<![CDATA[";
+        setFavIcon("chrome://global/skin/icons/question-16.png");
+      } else {
+#ifndef XP_MACOSX
+        document.title = "]]>&privatebrowsingpage.title;<![CDATA[";
+#endif
+        setFavIcon("chrome://browser/skin/Privacy-16.png");
+      }
+
+      var mainWindow = window.QueryInterface(Ci.nsIInterfaceRequestor)
+                             .getInterface(Ci.nsIWebNavigation)
+                             .QueryInterface(Ci.nsIDocShellTreeItem)
+                             .rootTreeItem
+                             .QueryInterface(Ci.nsIInterfaceRequestor)
+                             .getInterface(Ci.nsIDOMWindow);
+
+      // Focus the location bar
+      mainWindow.focusAndSelectUrlBar();
 
       function openSanitizeDialog() {
         let browserGlue = Cc["@mozilla.org/browser/browserglue;1"].
                           getService(Ci.nsIBrowserGlue);
         browserGlue.sanitize(mainWindow);
       }
 
       function setFavIcon(url) {
         var icon = document.createElement("link");
         icon.setAttribute("rel", "icon");
         icon.setAttribute("type", "image/png");
         icon.setAttribute("href", url);
-        document.getElementsByTagName("head")[0].appendChild(icon);
+        var head = document.getElementsByTagName("head")[0];
+        head.insertBefore(icon, head.firstChild);
       }
 
-      function onLoad() {
+      document.addEventListener("DOMContentLoaded", function () {
         let selector;
-        let pb = Cc["@mozilla.org/privatebrowsing;1"].
-                 getService(Ci.nsIPrivateBrowsingService);
         if (!pb.privateBrowsingEnabled) {
           document.body.setAttribute("class", "normal");
-          document.title = document.body.getAttribute("normaltitle");
-          setFavIcon("chrome://global/skin/icons/question-16.png");
           selector = ".showPrivate";
         }
         else {
-          setFavIcon("chrome://browser/skin/Privacy-16.png");
           selector = ".showNormal";
         }
 
         // Remove hidden elements to avoid bug 39098
         let elements = document.body.querySelectorAll(selector);
         for (let i = 0; i < elements.length; ++ i)
           elements[i].parentNode.removeChild(elements[i]);
 
         // Set up the help link
         let moreInfoURL = Cc["@mozilla.org/toolkit/URLFormatterService;1"].
                           getService(Ci.nsIURLFormatter).
                           formatURLPref("app.support.baseURL");
         let moreInfoLink = document.getElementById("moreInfoLink");
         if (moreInfoLink)
           moreInfoLink.setAttribute("href", moreInfoURL + "private-browsing");
-
-        // Focus the location bar
-        if (mainWindow.gURLBar)
-          mainWindow.gURLBar.focus();
-      }
+      }, false);
     ]]></script>
   </head>
 
   <body dir="&locale.dir;"
-        class="private"
-        onload="onLoad();"
-        normaltitle="&privatebrowsingpage.title.normal;">
+        class="private">
 
     <!-- PAGE CONTAINER (for styling purposes only) -->
     <div id="errorPageContainer">
 
       <!-- Error Title -->
       <div id="errorTitle">
         <h1 id="errorTitleText" class="showPrivate">&privatebrowsingpage.title;</h1>
         <h1 id="errorTitleTextNormal" class="showNormal">&privatebrowsingpage.title.normal;</h1>
--- a/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js
+++ b/browser/components/privatebrowsing/test/browser/browser_privatebrowsing_windowtitle.js
@@ -75,29 +75,21 @@ function test() {
     pb_about_pb_title = "Private Browsing - " + app_name + " (Private Browsing)";
   }
 
   function testTabTitle(url, insidePB, expected_title, funcNext) {
     pb.privateBrowsingEnabled = insidePB;
 
     let tab = gBrowser.selectedTab = gBrowser.addTab();
     let browser = gBrowser.selectedBrowser;
+    browser.stop();
     // ensure that the test is run after the titlebar has been updated
-    let timer = null;
-    let _updateTitlebar = gBrowser.updateTitlebar;
-    gBrowser.updateTitlebar = function() {
-      if (timer) {
-        timer.cancel();
-        timer = null;
-      }
-      timer = Cc["@mozilla.org/timer;1"].
-              createInstance(Ci.nsITimer);
-      timer.initWithCallback(function () {
-        _updateTitlebar.apply(gBrowser, arguments);
-        gBrowser.updateTitlebar = _updateTitlebar;
+    browser.addEventListener("pageshow", function () {
+      browser.removeEventListener("pageshow", arguments.callee, false);
+      executeSoon(function () {
         is(document.title, expected_title, "The window title for " + url +
            " is correct (" + (insidePB ? "inside" : "outside") +
            " private browsing mode)");
 
         let win = gBrowser.replaceTabWithWindow(tab);
         win.addEventListener("load", function() {
           win.removeEventListener("load", arguments.callee, false);
 
@@ -110,18 +102,18 @@ function test() {
             is(win.document.title, expected_title, "The window title for " + url +
                " detached tab is correct (" + (insidePB ? "inside" : "outside") +
                " private browsing mode)");
             win.close();
 
             setTimeout(funcNext, 0);
           };
         }, false);
-      }, 300, Ci.nsITimer.TYPE_ONE_SHOT);
-    };
+      });
+    }, false);
 
     browser.loadURI(url);
   }
 
   function cleanup() {
     pb.privateBrowsingEnabled = false;
     gPrefService.clearUserPref("browser.privatebrowsing.keep_current_session");
     finish();
--- a/browser/components/sessionstore/src/nsSessionStore.js
+++ b/browser/components/sessionstore/src/nsSessionStore.js
@@ -264,16 +264,18 @@ SessionStoreService.prototype = {
               formdata: { "#sessionData": iniString }
             };
             this._initialState = { windows: [{ tabs: [{ entries: [pageData] }] }] };
           }
         }
         
         // make sure that at least the first window doesn't have anything hidden
         delete this._initialState.windows[0].hidden;
+        // Since nothing is hidden in the first window, it cannot be a popup
+        delete this._initialState.windows[0].isPopup;
       }
       catch (ex) { debug("The session file is invalid: " + ex); }
     }
 
     // remove the session data files if crash recovery is disabled
     if (!this._resume_from_crash)
       this._clearDisk();
     else { // create a backup if the session data file exists
--- a/browser/components/sessionstore/test/browser/browser_394759_privatebrowsing.js
+++ b/browser/components/sessionstore/test/browser/browser_394759_privatebrowsing.js
@@ -16,16 +16,17 @@
  * The Initial Developer of the Original Code is
  * Aaron Train <aaron.train@gmail.com>.
  * Portions created by the Initial Developer are Copyright (C) 2008
  * the Initial Developer. All Rights Reserved.
  *
  * Contributor(s):
  *   Ehsan Akhgari <ehsan.akhgari@gmail.com>
  *   Paul O’Shannessy <paul@oshannessy.com>
+ *   Marco Bonardo <mak77@bonardo.net>
  *
  * Alternatively, the contents of this file may be used under the terms of
  * either the GNU General Public License Version 2 or later (the "GPL"), or
  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  * in which case the provisions of the GPL or the LGPL are applicable instead
  * of those above. If you wish to allow use of your version of this file only
  * under the terms of either the GPL or the LGPL, and not to allow others to
  * use your version of this file under the terms of the MPL, indicate your
@@ -34,30 +35,30 @@
  * the provisions above, a recipient may use your version of this file under
  * the terms of any one of the MPL, the GPL or the LGPL.
  *
  * ***** END LICENSE BLOCK ***** */
 
 function test() {
   /** Private Browsing Test for Bug 394759 **/
 
-  // test setup
   waitForExplicitFinish();
 
-  // private browsing service
+  // Setup.
   let pb = Cc["@mozilla.org/privatebrowsing;1"].
            getService(Ci.nsIPrivateBrowsingService);
+  let ss = Cc["@mozilla.org/browser/sessionstore;1"].
+           getService(Ci.nsISessionStore);
+  let ww = Cc["@mozilla.org/embedcomp/window-watcher;1"].
+           getService(Ci.nsIWindowWatcher);
+
+  // Remove the sessionstore.js file before setting the interval to 0
   let profilePath = Cc["@mozilla.org/file/directory_service;1"].
                     getService(Ci.nsIProperties).
                     get("ProfD", Ci.nsIFile);
-
-  // sessionstore service
-  let ss = Cc["@mozilla.org/browser/sessionstore;1"].
-           getService(Ci.nsISessionStore);
-  // Remove the sessionstore.js file before setting the interval to 0
   let sessionStoreJS = profilePath.clone();
   sessionStoreJS.append("sessionstore.js");
   if (sessionStoreJS.exists())
     sessionStoreJS.remove(false);
   ok(sessionStoreJS.exists() == false, "sessionstore.js was removed");
   // Make sure that sessionstore.js can be forced to be created by setting
   // the interval pref to 0
   gPrefService.setIntPref("browser.sessionstore.interval", 0);
@@ -74,98 +75,103 @@ function test() {
     }],
     _closedWindows: []
   });
   ss.setBrowserState(blankState);
 
   let closedWindowCount = ss.getClosedWindowCount();
   is(closedWindowCount, 0, "Correctly set window count");
 
-  let testURL_A = "about:config";
-  let testURL_B = "about:mozilla";
+  // Prevent VM timers issues, cache now and increment it manually.
+  const NOW = Date.now();
 
-  let uniqueKey_A = "bug 394759 Non-PB";
-  let uniqueValue_A = "unik" + Date.now();
-  let uniqueKey_B = "bug 394759 PB";
-  let uniqueValue_B = "uniq" + Date.now();
-
+  const TESTS = [
+    { url: "about:config",
+      key: "bug 394759 Non-PB",
+      value: "uniq" + (++NOW) },
+    { url: "about:mozilla",
+      key: "bug 394759 PB",
+      value: "uniq" + (++NOW) },
+  ];
 
-  // Open a window
-  let newWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_A);
-  newWin.addEventListener("load", function(aEvent) {
-    newWin.removeEventListener("load", arguments.callee, false);
-    newWin.gBrowser.addEventListener("load", function(aEvent) {
-      newWin.gBrowser.removeEventListener("load", arguments.callee, true);
-      info("Window has been loaded");
-      executeSoon(function() {
-        newWin.gBrowser.addTab();
-        executeSoon(function() {
-          // mark the window with some unique data to be restored later on
-          ss.setWindowValue(newWin, uniqueKey_A, uniqueValue_A);
+  function openWindowAndTest(aTestIndex, aRunNextTestInPBMode) {
+    info("Opening new window");
+    let windowObserver = {
+      observe: function(aSubject, aTopic, aData) {
+        if (aTopic === "domwindowopened") {
+          ww.unregisterNotification(this);
+          info("New window has been opened");
+          let win = aSubject.QueryInterface(Ci.nsIDOMWindow);
+          win.addEventListener("load", function onLoad(event) {
+            win.removeEventListener("load", onLoad, false);
+            info("New window has been loaded");
+            win.gBrowser.addEventListener("load", function(aEvent) {
+              win.gBrowser.removeEventListener("load", arguments.callee, true);
+              info("New window browser has been loaded");
+              executeSoon(function() {
+                // Add a tab.
+                win.gBrowser.addTab();
 
-          newWin.close();
-
-          // ensure that we incremented # of close windows
-          is(ss.getClosedWindowCount(), closedWindowCount + 1,
-             "The closed window was added to the list");
+                executeSoon(function() {
+                  // Mark the window with some unique data to be restored later on.
+                  ss.setWindowValue(win, TESTS[aTestIndex].key, TESTS[aTestIndex].value);
 
-          // ensure we added window to undo list
-          let data = JSON.parse(ss.getClosedWindowData())[0];
-          ok(data.toSource().indexOf(uniqueValue_A) > -1,
-             "The closed window data was stored correctly");
+                  win.close();
 
-          // enter private browsing mode
-          pb.privateBrowsingEnabled = true;
-          ok(pb.privateBrowsingEnabled, "private browsing enabled");
+                  // Ensure that we incremented # of close windows.
+                  is(ss.getClosedWindowCount(), closedWindowCount + 1,
+                     "The closed window was added to the list");
 
-          // ensure that we have 0 undo windows when entering PB
-          is(ss.getClosedWindowCount(), 0,
-             "Recently Closed Windows are removed when entering Private Browsing");
-          is(ss.getClosedWindowData(), "[]",
-             "Recently Closed Windows data is cleared when entering Private Browsing");
+                  // Ensure we added window to undo list.
+                  let data = JSON.parse(ss.getClosedWindowData())[0];
+                  ok(data.toSource().indexOf(TESTS[aTestIndex].value) > -1,
+                     "The closed window data was stored correctly");
+
+                  if (aRunNextTestInPBMode) {
+                    // Enter private browsing mode.
+                    pb.privateBrowsingEnabled = true;
+                    ok(pb.privateBrowsingEnabled, "private browsing enabled");
 
-          // open another window in PB
-          let pbWin = openDialog(location, "_blank", "chrome,all,dialog=no", testURL_B);
-          pbWin.addEventListener("load", function(aEvent) {
-            pbWin.removeEventListener("load", arguments.callee, false);
-            pbWin.gBrowser.addEventListener("load", function(aEvent) {
-              pbWin.gBrowser.removeEventListener("load", arguments.callee, true);
-
-              executeSoon(function() {
-                // Add another tab, though it's not strictly needed
-                pbWin.gBrowser.addTab();
-                executeSoon(function() {
-                  // mark the window with some unique data to be restored later on
-                  ss.setWindowValue(pbWin, uniqueKey_B, uniqueValue_B);
-
-                  pbWin.close();
+                    // Ensure that we have 0 undo windows when entering PB.
+                    is(ss.getClosedWindowCount(), 0,
+                       "Recently Closed Windows are removed when entering Private Browsing");
+                    is(ss.getClosedWindowData(), "[]",
+                       "Recently Closed Windows data is cleared when entering Private Browsing");
+                  }
+                  else {
+                    // Exit private browsing mode.
+                    pb.privateBrowsingEnabled = false;
+                    ok(!pb.privateBrowsingEnabled, "private browsing disabled");
 
-                  // ensure we added window to undo list
-                  let data = JSON.parse(ss.getClosedWindowData())[0];
-                  ok(data.toSource().indexOf(uniqueValue_B) > -1,
-                     "The closed window data was stored correctly in PB mode");
-
-                  // exit private browsing mode
-                  pb.privateBrowsingEnabled = false;
-                  ok(!pb.privateBrowsingEnabled, "private browsing disabled");
+                    // Ensure that we still have the closed windows from before.
+                    is(ss.getClosedWindowCount(), closedWindowCount + 1,
+                       "The correct number of recently closed windows were restored " +
+                       "when exiting PB mode");
 
-                  // ensure that we still have the closed windows from before
-                  is(ss.getClosedWindowCount(), closedWindowCount + 1,
-                     "The correct number of recently closed windows were restored " +
-                     "when exiting PB mode");
+                    let data = JSON.parse(ss.getClosedWindowData())[0];
+                    ok(data.toSource().indexOf(TESTS[aTestIndex].value) > -1,
+                       "The data associated with the recently closed window was " +
+                       "restored when exiting PB mode");
+                  }
 
-                  let data = JSON.parse(ss.getClosedWindowData())[0];
-                  ok(data.toSource().indexOf(uniqueValue_A) > -1,
-                     "The data associated with the recently closed window was " +
-                     "restored when exiting PB mode");
-
-                  // cleanup
-                  gPrefService.clearUserPref("browser.sessionstore.interval");
-                  finish();
+                  if (aTestIndex == TESTS.length - 1) {
+                    // Cleanup and finish.
+                    gPrefService.clearUserPref("browser.sessionstore.interval");
+                    finish();
+                  }
+                  else {
+                    // Run next test.
+                    openWindowAndTest(aTestIndex + 1, !aRunNextTestInPBMode);
+                  }
                 });
               });
             }, true);
           }, false);
-        });
-      });
-    }, true);
-  }, false);
+        }
+      }
+    };
+    ww.registerNotification(windowObserver);
+    // Open a window.
+    openDialog(location, "_blank", "chrome,all,dialog=no", TESTS[aTestIndex].url);
+  }
+
+  openWindowAndTest(0, true);
 }
--- a/browser/components/wintaskbar/WindowsPreviewPerTab.jsm
+++ b/browser/components/wintaskbar/WindowsPreviewPerTab.jsm
@@ -1,9 +1,9 @@
-/* vim: se cin sw=2 ts=2 et :
+/* vim: se cin sw=2 ts=2 et filetype=javascript :
  * ***** BEGIN LICENSE BLOCK *****
  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  *
  * The contents of this file are subject to the Mozilla Public License Version
  * 1.1 (the "License"); you may not use this file except in compliance with
  * the License. You may obtain a copy of the License at
  * http://www.mozilla.org/MPL/
  *
@@ -100,38 +100,41 @@ XPCOMUtils.defineLazyServiceGetter(this,
 XPCOMUtils.defineLazyServiceGetter(this, "imgTools",
                                    "@mozilla.org/image/tools;1",
                                    "imgITools");
 XPCOMUtils.defineLazyServiceGetter(this, "faviconSvc",
                                    "@mozilla.org/browser/favicon-service;1",
                                    "nsIFaviconService");
 
 // nsIURI -> imgIContainer
-function _imageFromURI(uri) {
+function _imageFromURI(uri, callback) {
   let channel = ioSvc.newChannelFromURI(uri);
-
-  let out_img = { value: null };
-  let inputStream = channel.open();
-  try {
-    imgTools.decodeImageData(inputStream, channel.contentType, out_img);
-    return out_img.value;
-  } catch (e) {
-    return null;
-  }
-}
-
-// string -> imgIContainer
-function _imageFromURL(url) {
-  return _imageFromURI(NetUtil.newURI(url));
+  NetUtil.asyncFetch(channel, function(inputStream, resultCode) {
+    if (!Components.isSuccessCode(resultCode))
+      return;
+    try {
+      let out_img = { value: null };
+      imgTools.decodeImageData(inputStream, channel.contentType, out_img);
+      callback(out_img.value);
+    } catch (e) {
+      // We failed, so use the default favicon (only if this wasn't the default
+      // favicon).
+      let defaultURI = faviconSvc.defaultFavicon;
+      if (!defaultURI.equals(uri))
+        _imageFromURI(defaultURI, callback);
+    }
+  });
 }
 
 // string? -> imgIContainer
-function getFaviconAsImage(iconurl) {
-  return (iconurl ? _imageFromURL(iconurl) : false) ||
-        _imageFromURI(faviconSvc.defaultFavicon);
+function getFaviconAsImage(iconurl, callback) {
+  if (iconurl)
+    _imageFromURI(NetUtil.newURI(iconurl), callback);
+  else
+    _imageFromURI(faviconSvc.defaultFavicon, callback);
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //// PreviewController
 
 /*
  * This class manages the behavior of the preview.
  *
@@ -417,18 +420,24 @@ TabWindow.prototype = {
   newTab: function (tab) {
     let controller = new PreviewController(this, tab);
     let preview = AeroPeek.taskbar.createTaskbarTabPreview(this.tabbrowser.docShell, controller);
     preview.title = tab.label;
     preview.tooltip = tab.label;
     preview.visible = AeroPeek.enabled;
     preview.active = this.tabbrowser.selectedTab == tab;
     // Grab the default favicon
-    preview.icon = getFaviconAsImage(null);
+    getFaviconAsImage(null, function (img) {
+      // It is possible that we've already gotten the real favicon, so make sure
+      // we have not set one before setting this default one.
+      if (!preview.icon)
+        preview.icon = img;
+    });
 
+    // It's OK to add the preview now while the favicon still loads.
     this.previews.splice(tab._tPos, 0, preview);
     AeroPeek.addPreview(preview);
   },
 
   // Invoked when the given tab is closed
   removeTab: function (tab) {
     let preview = this.previewFromTab(tab);
     preview.active = false;
@@ -504,19 +513,23 @@ TabWindow.prototype = {
   },
   onSecurityChange: function () {
   },
   onStateChange: function () {
   },
   onStatusChange: function () {
   },
   onLinkIconAvailable: function (aBrowser) {
-    let img = getFaviconAsImage(aBrowser.mIconURL);
-    let index = this.tabbrowser.browsers.indexOf(aBrowser);
-    this.previews[index].icon = img;
+    let self = this;
+    getFaviconAsImage(aBrowser.mIconURL, function (img) {
+      let index = self.tabbrowser.browsers.indexOf(aBrowser);
+      // Only add it if we've found the index.  The tab could have closed!
+      if (index != -1)
+        self.previews[index].icon = img;
+    });
   }
 }
 
 ////////////////////////////////////////////////////////////////////////////////
 //// AeroPeek
 
 /*
  * This object acts as global storage and external interface for this feature.
--- a/browser/components/wintaskbar/test/browser_taskbar_preview.js
+++ b/browser/components/wintaskbar/test/browser_taskbar_preview.js
@@ -6,44 +6,46 @@ function test() {
                     .getProperty("version");
     isWin7OrHigher = (parseFloat(version) >= 6.1);
   } catch (ex) { }
 
   is(!!Win7Features, isWin7OrHigher, "Win7Features available when it should be");
   if (!isWin7OrHigher)
     return;
 
+  const ENABLE_PREF_NAME = "browser.taskbar.previews.enable";
+
   let temp = {};
   Cu.import("resource://gre/modules/WindowsPreviewPerTab.jsm", temp);
   let AeroPeek = temp.AeroPeek;
 
   waitForExplicitFinish();
 
-  gPrefService.setBoolPref("aeropeek.enable", true);
+  gPrefService.setBoolPref(ENABLE_PREF_NAME, true);
 
   is(1, AeroPeek.windows.length, "Got the expected number of windows");
 
   checkPreviews(1, "Browser starts with one preview");
 
   gBrowser.addTab();
   gBrowser.addTab();
   gBrowser.addTab();
 
   checkPreviews(4, "Correct number of previews after adding");
 
   for each (let preview in AeroPeek.previews)
     ok(preview.visible, "Preview is shown as expected");
 
-  gPrefService.setBoolPref("aeropeek.enable", false);
+  gPrefService.setBoolPref(ENABLE_PREF_NAME, false);
   checkPreviews(4, "Previews are unchanged when disabling");
 
   for each (let preview in AeroPeek.previews)
     ok(!preview.visible, "Preview is not shown as expected after disabling");
 
-  gPrefService.setBoolPref("aeropeek.enable", true);
+  gPrefService.setBoolPref(ENABLE_PREF_NAME, true);
   checkPreviews(4, "Previews are unchanged when re-enabling");
   for each (let preview in AeroPeek.previews)
     ok(preview.visible, "Preview is shown as expected after re-enabling");
 
   [1,2,3,4].forEach(function (idx) {
     gBrowser.selectedTab = gBrowser.mTabs[idx];
     ok(checkSelectedTab(), "Current tab is correctly selected");
   });
@@ -87,17 +89,17 @@ function test() {
 
   // Change selection
   gBrowser.selectedTab = gBrowser.mTabs[0];
   checkSelectedTab();
   // Close nonselected tab via controller
   getPreviewForTab(gBrowser.mTabs[1]).controller.onClose();
   checkPreviews(1);
 
-  gPrefService.clearUserPref("aeropeek.enable");
+  gPrefService.clearUserPref(ENABLE_PREF_NAME);
 
   finish();
 
   function checkPreviews(aPreviews, msg) {
     let nPreviews = AeroPeek.previews.length;
     is(aPreviews, gBrowser.mTabs.length, "Browser has expected number of tabs");
     is(nPreviews, gBrowser.mTabs.length, "Browser has one preview per tab");
     is(nPreviews, aPreviews, msg || "Got expected number of previews");
--- a/browser/installer/package-manifest.in
+++ b/browser/installer/package-manifest.in
@@ -117,16 +117,17 @@
 @BINPATH@/components/browser-feeds.xpt
 @BINPATH@/components/caps.xpt
 @BINPATH@/components/chardet.xpt
 @BINPATH@/components/chrome.xpt
 @BINPATH@/components/commandhandler.xpt
 @BINPATH@/components/commandlines.xpt
 @BINPATH@/components/composer.xpt
 @BINPATH@/components/content_base.xpt
+@BINPATH@/components/content_events.xpt
 @BINPATH@/components/content_canvas.xpt
 @BINPATH@/components/content_htmldoc.xpt
 @BINPATH@/components/content_html.xpt
 @BINPATH@/components/content_xmldoc.xpt
 @BINPATH@/components/content_xslt.xpt
 @BINPATH@/components/content_xtf.xpt
 @BINPATH@/components/contentprefs.xpt
 @BINPATH@/components/cookie.xpt
--- a/browser/locales/en-US/chrome/browser-region/region.properties
+++ b/browser/locales/en-US/chrome/browser-region/region.properties
@@ -4,17 +4,17 @@ browser.search.defaultenginename=Google
 # Search engine order (order displayed in the search bar dropdown)s
 browser.search.order.1=Google
 browser.search.order.2=Yahoo
 
 # This is the default set of web based feed handlers shown in the reader
 # selection UI
 browser.contentHandlers.types.0.title=Bloglines
 browser.contentHandlers.types.0.uri=http://www.bloglines.com/login?r=/sub/%s
-browser.contentHandlers.types.1.title=My Yahoo
+browser.contentHandlers.types.1.title=My Yahoo!
 browser.contentHandlers.types.1.uri=http://add.my.yahoo.com/rss?url=%s
 browser.contentHandlers.types.2.title=Google
 browser.contentHandlers.types.2.uri=http://fusion.google.com/add?feedurl=%s
 
 # Keyword URL (for location bar searches)
 keyword.URL=http://www.google.com/search?ie=UTF-8&oe=UTF-8&sourceid=navclient&gfns=1&q=
 
 # URL for site-specific search engines
--- a/browser/locales/en-US/chrome/browser/aboutSupport.dtd
+++ b/browser/locales/en-US/chrome/browser/aboutSupport.dtd
@@ -15,16 +15,23 @@
 
 <!ENTITY aboutSupport.appBasicsTitle "Application Basics">
 <!ENTITY aboutSupport.appBasicsName "Name">
 <!ENTITY aboutSupport.appBasicsVersion "Version">
 <!ENTITY aboutSupport.appBasicsProfileDir "Profile Directory">
 <!ENTITY aboutSupport.appBasicsPlugins "Installed Plugins">
 <!ENTITY aboutSupport.appBasicsBuildConfig "Build Configuration">
 
+<!ENTITY aboutSupport.show.label "Open Containing Folder">
+
+<!-- LOCALIZATION NOTE (aboutSupport.showMac.label): This is the Mac-specific
+variant of aboutSupport.show.label.  This allows us to use the preferred
+"Finder" terminology on Mac. -->
+<!ENTITY aboutSupport.showMac.label "Show in Finder">
+
 <!ENTITY aboutSupport.modifiedPrefsTitle "Modified Preferences">
 <!ENTITY aboutSupport.modifiedPrefsName "Name">
 <!ENTITY aboutSupport.modifiedPrefsValue "Value">
 
 <!ENTITY aboutSupport.installationHistoryTitle "Installation History">
 <!ENTITY aboutSupport.updateHistoryTitle "Update History">
 
 <!ENTITY aboutSupport.copyToClipboard.label "Copy all to clipboard">
--- a/config/autoconf.mk.in
+++ b/config/autoconf.mk.in
@@ -620,16 +620,18 @@ MOZ_DISTRIBUTION_ID = @MOZ_DISTRIBUTION_
 
 NS_OSSO 	= @NS_OSSO@
 MOZ_PLATFORM_HILDON = @MOZ_PLATFORM_HILDON@
 
 LIBHILDONMIME_CFLAGS	= @LIBHILDONMIME_CFLAGS@
 LIBHILDONMIME_LIBS	= @LIBHILDONMIME_LIBS@
 LIBOSSO_CFLAGS 	= @LIBOSSO_CFLAGS@
 LIBOSSO_LIBS 	= @LIBOSSO_LIBS@
+LIBHILDONFM_CFLAGS	= @LIBHILDONFM_CFLAGS@
+LIBHILDONFM_LIBS	= @LIBHILDONFM_LIBS@
 
 MACOS_SDK_DIR	= @MACOS_SDK_DIR@
 NEXT_ROOT	= @NEXT_ROOT@
 GCC_VERSION	= @GCC_VERSION@
 XCODEBUILD_VERSION= @XCODEBUILD_VERSION@
 HAS_XCODE_2_1	= @HAS_XCODE_2_1@
 UNIVERSAL_BINARY= @UNIVERSAL_BINARY@
 HAVE_DTRACE= @HAVE_DTRACE@
--- a/configure.in
+++ b/configure.in
@@ -6193,16 +6193,22 @@ if test $NS_OSSO; then
         AC_MSG_ERROR([DBus is required when building for OSSO])
     fi
     AC_DEFINE(NS_OSSO)
     MOZ_GFX_OPTIMIZE_MOBILE=1
 fi
 AC_SUBST(LIBOSSO_CFLAGS)
 AC_SUBST(LIBOSSO_LIBS)
 
+PKG_CHECK_MODULES(LIBHILDONFM,hildon-fm-2,
+                  NS_HILDONFM=1,
+                  NS_HILDONFM)
+AC_SUBST(LIBHILDONFM_CFLAGS)
+AC_SUBST(LIBHILDONFM_LIBS)
+
 dnl ========================================================
 dnl = faststripe theme
 dnl ========================================================
 MOZ_ARG_ENABLE_BOOL(faststripe,
 [  --enable-faststripe  Use faststripe theme],
     MOZ_THEME_FASTSTRIPE=1,
     MOZ_THEME_FASTSTRIPE= )
 AC_SUBST(MOZ_THEME_FASTSTRIPE)
--- a/content/base/public/nsContentCID.h
+++ b/content/base/public/nsContentCID.h
@@ -296,13 +296,20 @@
 
 #define NS_SYNCLOADDOMSERVICE_CID                   \
  { /* 0e4e7d00-f71a-439f-9178-1a71ff11b55f */       \
   0x0e4e7d00, 0xf71a, 0x439f,                       \
  {0x91, 0x78, 0x1a, 0x71, 0xff, 0x11, 0xb5, 0x5f} }
 #define NS_SYNCLOADDOMSERVICE_CONTRACTID            \
 "@mozilla.org/content/syncload-dom-service;1"
 
+#define NS_EVENTLISTENERSERVICE_CID                 \
+ { /* baa34652-f1f1-4185-b224-244ee82a413a */       \
+   0xbaa34652, 0xf1f1, 0x4185,                      \
+  {0xb2, 0x24, 0x24, 0x4e, 0xe8, 0x2a, 0x41, 0x3a } }
+#define NS_EVENTLISTENERSERVICE_CONTRACTID \
+  "@mozilla.org/eventlistenerservice;1"
+
 // {f96f5ec9-755b-447e-b1f3-717d1a84bb41}
 #define NS_PLUGINDOCUMENT_CID \
 { 0xf96f5ec9, 0x755b, 0x447e, { 0xb1, 0xf3, 0x71, 0x7d, 0x1a, 0x84, 0xbb, 0x41 } }
 
 #endif /* nsContentCID_h__ */
--- a/content/base/public/nsContentUtils.h
+++ b/content/base/public/nsContentUtils.h
@@ -812,16 +812,21 @@ public:
                                         nsXPIDLString& aResult);
 
   /**
    * Returns true if aDocument is a chrome document
    */
   static PRBool IsChromeDoc(nsIDocument *aDocument);
 
   /**
+   * Returns true if aDocument is in a docshell whose parent is the same type
+   */
+  static PRBool IsChildOfSameType(nsIDocument* aDoc);
+
+  /**
    * Get the script file name to use when compiling the script
    * referenced by aURI. In cases where there's no need for any extra
    * security wrapper automation the script file name that's returned
    * will be the spec in aURI, else it will be the spec in aDocument's
    * URI followed by aURI's spec, separated by " -> ". Returns PR_TRUE
    * if the script file name was modified, PR_FALSE if it's aURI's
    * spec.
    */
--- a/content/base/src/nsContentUtils.cpp
+++ b/content/base/src/nsContentUtils.cpp
@@ -3013,16 +3013,28 @@ nsContentUtils::IsChromeDoc(nsIDocument 
   
   nsCOMPtr<nsIPrincipal> systemPrincipal;
   sSecurityManager->GetSystemPrincipal(getter_AddRefs(systemPrincipal));
 
   return aDocument->NodePrincipal() == systemPrincipal;
 }
 
 PRBool
+nsContentUtils::IsChildOfSameType(nsIDocument* aDoc)
+{
+  nsCOMPtr<nsISupports> container = aDoc->GetContainer();
+  nsCOMPtr<nsIDocShellTreeItem> docShellAsItem(do_QueryInterface(container));
+  nsCOMPtr<nsIDocShellTreeItem> sameTypeParent;
+  if (docShellAsItem) {
+    docShellAsItem->GetSameTypeParent(getter_AddRefs(sameTypeParent));
+  }
+  return sameTypeParent != nsnull;
+}
+
+PRBool
 nsContentUtils::GetWrapperSafeScriptFilename(nsIDocument *aDocument,
                                              nsIURI *aURI,
                                              nsACString& aScriptURI)
 {
   PRBool scriptFileNameModified = PR_FALSE;
   aURI->GetSpec(aScriptURI);
 
   if (IsChromeDoc(aDocument)) {
--- a/content/base/src/nsDocument.cpp
+++ b/content/base/src/nsDocument.cpp
@@ -1780,16 +1780,17 @@ NS_IMPL_CYCLE_COLLECTION_TRAVERSE_BEGIN(
 
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mChannel)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mStyleAttrStyleSheet)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mScriptEventManager)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mXPathEvaluatorTearoff)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mLayoutHistoryState)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mOnloadBlocker)
   NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mFirstBaseNodeWithHref)
+  NS_IMPL_CYCLE_COLLECTION_TRAVERSE_NSCOMPTR(mDOMImplementation)
 
   // An element will only be in the linkmap as long as it's in the
   // document, so we'll traverse the table here instead of from the element.
   if (tmp->mLinkMap.IsInitialized()) {
     tmp->mLinkMap.EnumerateEntries(LinkMapTraverser, &cb);
   }
 
   // Traverse all our nsCOMArrays.
@@ -1832,16 +1833,17 @@ NS_IMPL_CYCLE_COLLECTION_UNLINK_BEGIN(ns
        indx >= 0; --indx) {
     tmp->mChildren.ChildAt(indx)->UnbindFromTree();
     tmp->mChildren.RemoveChildAt(indx);
   }
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mCachedRootContent)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDisplayDocument)
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mFirstBaseNodeWithHref)
+  NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMPTR(mDOMImplementation)
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK_USERDATA
 
   tmp->mParentDocument = nsnull;
 
   NS_IMPL_CYCLE_COLLECTION_UNLINK_NSCOMARRAY(mPreloadingImages)
 
   // nsDocument has a pretty complex destructor, so we're going to
@@ -4090,32 +4092,32 @@ nsDocument::GetDoctype(nsIDOMDocumentTyp
   }
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetImplementation(nsIDOMDOMImplementation** aImplementation)
 {
-  // For now, create a new implementation every time. This shouldn't
-  // be a high bandwidth operation
-  nsCOMPtr<nsIURI> uri;
-  NS_NewURI(getter_AddRefs(uri), "about:blank");
-  NS_ENSURE_TRUE(uri, NS_ERROR_OUT_OF_MEMORY);
-  PRBool hasHadScriptObject = PR_TRUE;
-  nsIScriptGlobalObject* scriptObject =
-    GetScriptHandlingObject(hasHadScriptObject);
-  NS_ENSURE_STATE(scriptObject || !hasHadScriptObject);
-  *aImplementation = new nsDOMImplementation(scriptObject, uri, uri,
-                                             NodePrincipal());
-  if (!*aImplementation) {
-    return NS_ERROR_OUT_OF_MEMORY;
-  }
-
-  NS_ADDREF(*aImplementation);
+  if (!mDOMImplementation) {
+    nsCOMPtr<nsIURI> uri;
+    NS_NewURI(getter_AddRefs(uri), "about:blank");
+    NS_ENSURE_TRUE(uri, NS_ERROR_OUT_OF_MEMORY);
+    PRBool hasHadScriptObject = PR_TRUE;
+    nsIScriptGlobalObject* scriptObject =
+      GetScriptHandlingObject(hasHadScriptObject);
+    NS_ENSURE_STATE(scriptObject || !hasHadScriptObject);
+    mDOMImplementation = new nsDOMImplementation(scriptObject, uri, uri,
+                                                 NodePrincipal());
+    if (!mDOMImplementation) {
+      return NS_ERROR_OUT_OF_MEMORY;
+    }
+  }
+
+  NS_ADDREF(*aImplementation = mDOMImplementation);
 
   return NS_OK;
 }
 
 NS_IMETHODIMP
 nsDocument::GetDocumentElement(nsIDOMElement** aDocumentElement)
 {
   NS_ENSURE_ARG_POINTER(aDocumentElement);
--- a/content/base/src/nsDocument.h
+++ b/content/base/src/nsDocument.h
@@ -112,16 +112,17 @@
 #include "nsIDocumentViewer.h"
 #include "nsIDOMXPathNSResolver.h"
 #include "nsIInterfaceRequestor.h"
 #include "nsILoadContext.h"
 #include "nsIProgressEventSink.h"
 #include "nsISecurityEventSink.h"
 #include "nsIChannelEventSink.h"
 #include "imgIRequest.h"
+#include "nsIDOMDOMImplementation.h"
 
 #define XML_DECLARATION_BITS_DECLARATION_EXISTS   (1 << 0)
 #define XML_DECLARATION_BITS_ENCODING_EXISTS      (1 << 1)
 #define XML_DECLARATION_BITS_STANDALONE_EXISTS    (1 << 2)
 #define XML_DECLARATION_BITS_STANDALONE_YES       (1 << 3)
 
 
 class nsIEventListenerManager;
@@ -1272,16 +1273,18 @@ private:
   nsRevocableEventPtr<nsNonOwningRunnableMethod<nsDocument> >
     mPendingTitleChangeEvent;
 
   nsExternalResourceMap mExternalResourceMap;
 
   // All images in process of being preloaded
   nsCOMArray<imgIRequest> mPreloadingImages;
 
+  nsCOMPtr<nsIDOMDOMImplementation> mDOMImplementation;
+
 #ifdef MOZ_SMIL
   nsAutoPtr<nsSMILAnimationController> mAnimationController;
 #endif // MOZ_SMIL
 
 #ifdef DEBUG
 protected:
   PRBool mWillReparent;
 #endif
--- a/content/base/src/nsGenericElement.cpp
+++ b/content/base/src/nsGenericElement.cpp
@@ -2689,17 +2689,17 @@ nsGenericElement::UnbindFromTree(PRBool 
     }
 
     document->ClearBoxObjectFor(this);
   }
 
   // Ensure that CSS transitions don't continue on an element at a
   // different place in the tree (even if reinserted before next
   // animation refresh).
-  // FIXME: Need a test for this.
+  // FIXME (Bug 522599): Need a test for this.
   if (HasFlag(NODE_HAS_PROPERTIES)) {
     DeleteProperty(nsGkAtoms::transitionsOfBeforeProperty);
     DeleteProperty(nsGkAtoms::transitionsOfAfterProperty);
     DeleteProperty(nsGkAtoms::transitionsProperty);
   }
 
   // Unset this since that's what the old code effectively did.
   UnsetFlags(NODE_FORCE_XBL_BINDINGS);
--- a/content/base/src/nsGkAtomList.h
+++ b/content/base/src/nsGkAtomList.h
@@ -1691,8 +1691,38 @@ GK_ATOM(Chinese, "zh-CN")
 GK_ATOM(Taiwanese, "zh-TW")
 GK_ATOM(HongKongChinese, "zh-HK")
 GK_ATOM(Unicode, "x-unicode")
 
 // Names for editor transactions
 GK_ATOM(TypingTxnName, "Typing")
 GK_ATOM(IMETxnName, "IME")
 GK_ATOM(DeleteTxnName, "Deleting")
+
+// Names for system metrics
+GK_ATOM(scrollbar_start_backward, "scrollbar-start-backward")
+GK_ATOM(scrollbar_start_forward, "scrollbar-start-forward")
+GK_ATOM(scrollbar_end_backward, "scrollbar-end-backward")
+GK_ATOM(scrollbar_end_forward, "scrollbar-end-forward")
+GK_ATOM(scrollbar_thumb_proportional, "scrollbar-thumb-proportional")
+GK_ATOM(images_in_menus, "images-in-menus")
+GK_ATOM(images_in_buttons, "images-in-buttons")
+GK_ATOM(windows_default_theme, "windows-default-theme")
+GK_ATOM(mac_graphite_theme, "mac-graphite-theme")
+GK_ATOM(windows_compositor, "windows-compositor")
+GK_ATOM(windows_classic, "windows-classic")
+GK_ATOM(touch_enabled, "touch-enabled")
+GK_ATOM(maemo_classic, "maemo-classic")
+
+// And the same again, as media query keywords.
+GK_ATOM(_moz_scrollbar_start_backward, "-moz-scrollbar-start-backward")
+GK_ATOM(_moz_scrollbar_start_forward, "-moz-scrollbar-start-forward")
+GK_ATOM(_moz_scrollbar_end_backward, "-moz-scrollbar-end-backward")
+GK_ATOM(_moz_scrollbar_end_forward, "-moz-scrollbar-end-forward")
+GK_ATOM(_moz_scrollbar_thumb_proportional, "-moz-scrollbar-thumb-proportional")
+GK_ATOM(_moz_images_in_menus, "-moz-images-in-menus")
+GK_ATOM(_moz_images_in_buttons, "-moz-images-in-buttons")
+GK_ATOM(_moz_windows_default_theme, "-moz-windows-default-theme")
+GK_ATOM(_moz_mac_graphite_theme, "-moz-mac-graphite-theme")
+GK_ATOM(_moz_windows_compositor, "-moz-windows-compositor")
+GK_ATOM(_moz_windows_classic, "-moz-windows-classic")
+GK_ATOM(_moz_touch_enabled, "-moz-touch-enabled")
+GK_ATOM(_moz_maemo_classic, "-moz-maemo-classic")
--- a/content/base/src/nsNodeUtils.h
+++ b/content/base/src/nsNodeUtils.h
@@ -190,20 +190,18 @@ public:
    * @param aNodesWithProperties All nodes (from amongst aNode and its
    *                             descendants) with properties.
    */
   static nsresult Adopt(nsINode *aNode, nsNodeInfoManager *aNewNodeInfoManager,
                         JSContext *aCx, JSObject *aOldScope,
                         JSObject *aNewScope,
                         nsCOMArray<nsINode> &aNodesWithProperties)
   {
-    nsCOMPtr<nsIDOMNode> dummy;
     return CloneAndAdopt(aNode, PR_FALSE, PR_TRUE, aNewNodeInfoManager, aCx,
-                         aOldScope, aNewScope, aNodesWithProperties,
-                         getter_AddRefs(dummy));
+                         aOldScope, aNewScope, aNodesWithProperties, nsnull);
   }
 
   /**
    * Associate an object aData to aKey on node aNode. If aData is null any
    * previously registered object and UserDataHandler associated to aKey on
    * aNode will be removed.
    * Should only be used to implement the DOM Level 3 UserData API.
    *
@@ -306,41 +304,47 @@ private:
    *            reparenting should be done. Must be null if aClone is PR_TRUE or
    *            if aNewNodeInfoManager is null.
    * @param aOldScope Old scope for the wrappers. May be null if aCx is null.
    * @param aNewScope New scope for the wrappers. May be null if aCx is null.
    * @param aNodesWithProperties All nodes (from amongst aNode and its
    *                             descendants) with properties. If aClone is
    *                             PR_TRUE every node will be followed by its
    *                             clone.
-   * @param aResult *aResult will contain the cloned node (if aClone is
-   *                PR_TRUE).
+   * @param aResult If aClone is PR_FALSE then aResult must be null, else
+   *                *aResult will contain the cloned node.
    */
   static nsresult CloneAndAdopt(nsINode *aNode, PRBool aClone, PRBool aDeep,
                                 nsNodeInfoManager *aNewNodeInfoManager,
                                 JSContext *aCx, JSObject *aOldScope,
                                 JSObject *aNewScope,
                                 nsCOMArray<nsINode> &aNodesWithProperties,
                                 nsIDOMNode **aResult)
   {
+    NS_ASSERTION(!aClone == !aResult,
+                 "aResult must be null when adopting and non-null when "
+                 "cloning");
+
     nsCOMPtr<nsINode> clone;
     nsresult rv = CloneAndAdopt(aNode, aClone, aDeep, aNewNodeInfoManager,
                                 aCx, aOldScope, aNewScope, aNodesWithProperties,
                                 nsnull, getter_AddRefs(clone));
     NS_ENSURE_SUCCESS(rv, rv);
 
     return clone ? CallQueryInterface(clone, aResult) : NS_OK;
   }
 
   /**
    * See above for arguments that aren't described here.
    *
    * @param aParent If aClone is PR_TRUE the cloned node will be appended to
    *                aParent's children. May be null. If not null then aNode
    *                must be an nsIContent.
+   * @param aResult If aClone is PR_TRUE then *aResult will contain the cloned
+   *                node.
    */
   static nsresult CloneAndAdopt(nsINode *aNode, PRBool aClone, PRBool aDeep,
                                 nsNodeInfoManager *aNewNodeInfoManager,
                                 JSContext *aCx, JSObject *aOldScope,
                                 JSObject *aNewScope,
                                 nsCOMArray<nsINode> &aNodesWithProperties,
                                 nsINode *aParent, nsINode **aResult);
 };
--- a/content/base/test/Makefile.in
+++ b/content/base/test/Makefile.in
@@ -74,16 +74,17 @@ include $(topsrcdir)/config/rules.mk
 		test_bug276037-1.html \
 		test_bug276037-2.xhtml \
 		test_bug298064.html \
 		bug298064-subframe.html \
 		test_bug308484.html \
 		test_bug311681.xml \
 		test_bug322317.html \
 		test_bug330925.xhtml \
+		test_bug333673.html \
 		test_bug337631.html \
 		test_bug338541.xhtml \
 		test_bug338679.html \
 		test_bug339494.html \
 		test_bug339494.xhtml \
 		test_bug339494.xul \
 		test_bug340571.html \
 		test_bug343596.html \
new file mode 100644
--- /dev/null
+++ b/content/base/test/test_bug333673.html
@@ -0,0 +1,31 @@
+<!DOCTYPE HTML>
+<html>
+<!--
+https://bugzilla.mozilla.org/show_bug.cgi?id=333673
+-->
+<head>
+  <title>Test for Bug 333673</title>
+  <script type="application/javascript" src="/MochiKit/packed.js"></script>
+  <script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
+  <link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
+</head>
+<body>
+<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=333673">Mozilla Bug 333673</a>
+<p id="display"></p>
+<div id="content" style="display: none">
+  
+</div>
+<pre id="test">
+<script type="application/javascript">
+
+/** Test for Bug 333673 **/
+
+is(document.implementation, document.implementation,
+   "document.implementation should be the same object all the time.");
+
+
+
+</script>
+</pre>
+</body>
+</html>
--- a/content/canvas/src/WebGLContextGL.cpp
+++ b/content/canvas/src/WebGLContextGL.cpp
@@ -582,21 +582,20 @@ WebGLContext::CheckFramebufferStatus(GLe
     *retval = gl->fCheckFramebufferStatus(target);
     return NS_OK;
 }
 
 GL_SAME_METHOD_1(Clear, Clear, PRUint32)
 
 GL_SAME_METHOD_4(ClearColor, ClearColor, float, float, float, float)
 
-// XXX the Web IDL method should be glClearDepth!
 #ifdef USE_GLES2
-GL_SAME_METHOD_1(ClearDepthf, ClearDepthf, float)
+GL_SAME_METHOD_1(ClearDepthf, ClearDepth, float)
 #else
-GL_SAME_METHOD_1(ClearDepth, ClearDepthf, float)
+GL_SAME_METHOD_1(ClearDepth, ClearDepth, float)
 #endif
 
 GL_SAME_METHOD_1(ClearStencil, ClearStencil, PRInt32)
 
 GL_SAME_METHOD_4(ColorMask, ColorMask, GLboolean, GLboolean, GLboolean, GLboolean)
 
 NS_IMETHODIMP
 WebGLContext::CopyTexImage2D(GLenum target,
@@ -858,21 +857,20 @@ WebGLContext::DetachShader(nsIWebGLProgr
 
     return NS_OK;
 }
 
 GL_SAME_METHOD_1(DepthFunc, DepthFunc, GLenum)
 
 GL_SAME_METHOD_1(DepthMask, DepthMask, GLboolean)
 
-// XXX should just be glDepthRange in webgl!
 #ifdef USE_GLES2
-GL_SAME_METHOD_2(DepthRangef, DepthRangef, float, float)
+GL_SAME_METHOD_2(DepthRangef, DepthRange, float, float)
 #else
-GL_SAME_METHOD_2(DepthRange, DepthRangef, float, float)
+GL_SAME_METHOD_2(DepthRange, DepthRange, float, float)
 #endif
 
 // XXX arg check!
 GL_SAME_METHOD_1(Disable, Disable, GLenum)
 
 NS_IMETHODIMP
 WebGLContext::DisableVertexAttribArray(GLuint index)
 {
deleted file mode 100644
--- a/content/canvas/test/test_2d.canvas.readonly.html
+++ /dev/null
@@ -1,27 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.canvas.readonly</title>
-<!-- Testing: CanvasRenderingContext2D.canvas is readonly -->
-<script src="/MochiKit/packed.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>
-
-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;
-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");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.canvas.reference.html
+++ /dev/null
@@ -1,23 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.canvas.reference</title>
-<!-- Testing: CanvasRenderingContext2D.canvas refers back to its canvas -->
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ok(ctx.canvas === canvas, "ctx.canvas === canvas");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.basic.html
+++ /dev/null
@@ -1,37 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.basic</title>
-<script src="/MochiKit/packed.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, 100, 50);
-isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.clip.html
+++ /dev/null
@@ -1,46 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.clip</title>
-<script src="/MochiKit/packed.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: #f00"><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.beginPath();
-ctx.rect(0, 0, 16, 16);
-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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.globalalpha.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.globalalpha</title>
-<script src="/MochiKit/packed.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.globalAlpha = 0.1;
-ctx.clearRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.globalcomposite.html
+++ /dev/null
@@ -1,38 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.globalcomposite</title>
-<script src="/MochiKit/packed.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.globalCompositeOperation = 'destination-atop';
-ctx.clearRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 0);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.negative.html
+++ /dev/null
@@ -1,43 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.negative</title>
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.nonfinite.html
+++ /dev/null
@@ -1,70 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.nonfinite</title>
-<!-- Testing: clearRect() with Infinity/NaN is ignored -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.path.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.path</title>
-<script src="/MochiKit/packed.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: #f00"><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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.shadow.html
+++ /dev/null
@@ -1,41 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.shadow</title>
-<script src="/MochiKit/packed.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: #f00"><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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.transform.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.transform</title>
-<script src="/MochiKit/packed.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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.clearRect.zero.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.clearRect.zero</title>
-<script src="/MochiKit/packed.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: #f00"><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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.canvas.copy.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.canvas.copy</title>
-<script src="/MochiKit/packed.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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.canvas.destination-out.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.canvas.destination-out</title>
-<script src="/MochiKit/packed.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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.canvas.destination-over.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.canvas.destination-over</title>
-<script src="/MochiKit/packed.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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.canvas.source-atop.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.canvas.source-atop</title>
-<script src="/MochiKit/packed.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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.canvas.source-over.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.canvas.source-over</title>
-<script src="/MochiKit/packed.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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.copy.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.copy</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.destination-atop.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.destination-atop</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.destination-in.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.destination-in</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.destination-out.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.destination-out</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.destination-over.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.destination-over</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.source-atop.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.source-atop</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.source-in.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.source-in</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.source-out.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.source-out</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.clip.source-over.html
+++ /dev/null
@@ -1,44 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.clip.source-over</title>
-<!-- Testing: fill() does not affect pixels outside the clip region. -->
-<script src="/MochiKit/packed.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>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.canvas.html
+++ /dev/null
@@ -1,45 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.canvas</title>
-<script src="/MochiKit/packed.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 = 100;
-canvas2.height = 50;
-var ctx2 = canvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.canvaspattern.html
+++ /dev/null
@@ -1,58 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.canvaspattern - bug 401790</title>
-<script src="/MochiKit/packed.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);
-}
-function todo_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];
-    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');
-
-var canvas2 = document.createElement('canvas');
-canvas2.width = 100;
-canvas2.height = 50;
-var ctx2 = canvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat');
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.default.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.default</title>
-<script src="/MochiKit/packed.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>
-
-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");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.fill.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.fill</title>
-<script src="/MochiKit/packed.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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.image.html
+++ /dev/null
@@ -1,39 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.image</title>
-<script src="/MochiKit/packed.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.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);
-
-SimpleTest.finish();
-
-});
-</script>
-<img src="image_red.png" id="red.png" class="resource">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.imagepattern.html
+++ /dev/null
@@ -1,52 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.imagepattern - bug 401790</title>
-<script src="/MochiKit/packed.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);
-}
-function todo_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];
-    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');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = ctx.createPattern(document.getElementById('red.png'), 'no-repeat');
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 2,253,0,255, "50,25", "2,253,0,255", 2);
-
-SimpleTest.finish();
-
-});
-</script>
-<img src="image_red.png" id="red.png" class="resource">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.invalid.html
+++ /dev/null
@@ -1,35 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.invalid</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ctx.globalAlpha = 0.5;
-var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
-var _thrown = undefined; try {
-  ctx.globalAlpha = Infinity;
-} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
-ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
-var _thrown = undefined; try {
-  ctx.globalAlpha = -Infinity;
-} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
-ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
-var _thrown = undefined; try {
-  ctx.globalAlpha = NaN;
-} catch (e) { _thrown = e }; todo(_thrown && _thrown.code == DOMException.NOT_SUPPORTED_ERR, "should throw NOT_SUPPORTED_ERR");
-ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.globalAlpha.range.html
+++ /dev/null
@@ -1,31 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.globalAlpha.range</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ctx.globalAlpha = 0.5;
-var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
-ctx.globalAlpha = 1.1;
-ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
-ctx.globalAlpha = -0.1;
-ok(ctx.globalAlpha == a, "ctx.globalAlpha == a");
-ctx.globalAlpha = 0;
-ok(ctx.globalAlpha == 0, "ctx.globalAlpha == 0");
-ctx.globalAlpha = 1;
-ok(ctx.globalAlpha == 1, "ctx.globalAlpha == 1");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.image.copy.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.image.copy</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'copy';
-ctx.drawImage(document.getElementById('yellow75.png'), 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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.image.destination-out.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.image.destination-out</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-out';
-ctx.drawImage(document.getElementById('yellow75.png'), 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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.image.destination-over.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.image.destination-over</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-over';
-ctx.drawImage(document.getElementById('yellow75.png'), 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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.image.source-atop.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.image.source-atop</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-atop';
-ctx.drawImage(document.getElementById('yellow75.png'), 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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.image.source-over.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.image.source-over</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-over';
-ctx.drawImage(document.getElementById('yellow75.png'), 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">
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.casesensitive.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.casesensitive - bug 401788</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-var _thrown_outer = false;
-try {
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'Source-over';
-ok(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-} catch (e) {
-    _thrown_outer = true;
-}
-todo(!_thrown_outer, 'should not throw exception');
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.clear.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.clear</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'clear';
-todo(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.darker.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.darker</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'darker';
-todo(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.default.html
+++ /dev/null
@@ -1,22 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.default</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ok(ctx.globalCompositeOperation == 'source-over', "ctx.globalCompositeOperation == 'source-over'");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.get.html
+++ /dev/null
@@ -1,29 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.get</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
-    'destination-atop', 'destination-in', 'destination-out', 'destination-over',
-    'lighter', 'copy', 'xor'];
-for (var i = 0; i < modes.length; ++i)
-{
-    ctx.globalCompositeOperation = modes[i];
-    ok(ctx.globalCompositeOperation == modes[i], "ctx.globalCompositeOperation == modes[\""+(i)+"\"]");
-}
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.highlight.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.highlight - bug 401788</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-var _thrown_outer = false;
-try {
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'highlight';
-ok(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-} catch (e) {
-    _thrown_outer = true;
-}
-todo(!_thrown_outer, 'should not throw exception');
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.nullsuffix.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.nullsuffix - bug 401788</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-var _thrown_outer = false;
-try {
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'source-over\0';
-ok(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-} catch (e) {
-    _thrown_outer = true;
-}
-todo(!_thrown_outer, 'should not throw exception');
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.over.html
+++ /dev/null
@@ -1,24 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.over</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'over';
-todo(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.operation.unrecognised.html
+++ /dev/null
@@ -1,32 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.operation.unrecognised - bug 401788</title>
-<script src="/MochiKit/packed.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>
-
-SimpleTest.waitForExplicitFinish();
-MochiKit.DOM.addLoadEvent(function () {
-
-var canvas = document.getElementById('c');
-var ctx = canvas.getContext('2d');
-
-var _thrown_outer = false;
-try {
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'nonexistent';
-ok(ctx.globalCompositeOperation == 'xor', "ctx.globalCompositeOperation == 'xor'");
-
-} catch (e) {
-    _thrown_outer = true;
-}
-todo(!_thrown_outer, 'should not throw exception');
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.copy.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.copy</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'copy';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.destination-atop.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.destination-atop</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.destination-in.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.destination-in</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-in';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.destination-out.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.destination-out</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-out';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.destination-over.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.destination-over</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-over';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,255,255,255, "50,25", "0,255,255,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.source-atop.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.source-atop</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-atop';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.source-in.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.source-in</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-in';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.source-out.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.source-out</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-out';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,0,0,0, "50,25", "0,0,0,0", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.solid.source-over.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.solid.source-over</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 255, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'source-over';
-ctx.fillStyle = 'rgba(255, 255, 0, 1.0)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 255,255,0,255, "50,25", "255,255,0,255", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.transparent.copy.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.transparent.copy</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 0, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'copy';
-ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,0,255,191, "50,25", "0,0,255,191", 5);
-
-SimpleTest.finish();
-
-});
-</script>
-
deleted file mode 100644
--- a/content/canvas/test/test_2d.composite.transparent.destination-atop.html
+++ /dev/null
@@ -1,40 +0,0 @@
-<!DOCTYPE HTML>
-<title>Canvas test: 2d.composite.transparent.destination-atop</title>
-<script src="/MochiKit/packed.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 = 'rgba(0, 255, 0, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.fillStyle = 'rgba(0, 0, 255, 0.75)';
-ctx.fillRect(0, 0, 100, 50);
-isPixel(ctx, 50,25, 0,127,127,191, "50,25", "0,127,127,191", 5);
-
-SimpleTest.finish();
-
-});
-</script>