aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html.ini2
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini2
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-color/color-mix-currentcolor-003.html.ini2
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini3
-rw-r--r--tests/wpt/metadata-layout-2020/css/css-text-decor/text-shadow/standards-decor-noblur-2.html.ini2
-rw-r--r--tests/wpt/metadata/MANIFEST.json5188
-rw-r--r--tests/wpt/metadata/css/css-color/color-mix-currentcolor-003.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini3
-rw-r--r--tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-2.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-text/white-space/trailing-other-space-separators-break-spaces-011.html.ini2
-rw-r--r--tests/wpt/metadata/css/css-values/calc-infinity-nan-computed.html.ini6
-rw-r--r--tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-length.html.ini9
-rw-r--r--tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-resolution.html.ini3
-rw-r--r--tests/wpt/metadata/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html.ini12
-rw-r--r--tests/wpt/metadata/custom-elements/scoped-registry/constructor-call.tentative.html.ini6
-rw-r--r--tests/wpt/metadata/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html.ini12
-rw-r--r--tests/wpt/metadata/dom/abort/abort-signal-any.any.js.ini5
-rw-r--r--tests/wpt/metadata/dom/abort/abort-signal-any.tentative.any.js.ini5
-rw-r--r--tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini1
-rw-r--r--tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini5
-rw-r--r--tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini6
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini11
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini4
-rw-r--r--tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini3
-rw-r--r--tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.image.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.value.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html.ini2
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.scale.large.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html.ini3
-rw-r--r--tests/wpt/metadata/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html.ini3
-rw-r--r--tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini3
-rw-r--r--tests/wpt/metadata/html/rendering/widgets/input-checkbox-no-centering.html.ini2
-rw-r--r--tests/wpt/metadata/html/rendering/widgets/input-radio-no-centering.html.ini2
-rw-r--r--tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini3
-rw-r--r--tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini3
-rw-r--r--tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini4
-rw-r--r--tests/wpt/metadata/html/semantics/forms/form-submission-0/text-plain.window.js.ini3
-rw-r--r--tests/wpt/metadata/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini6
-rw-r--r--tests/wpt/metadata/html/semantics/popovers/popover-css-properties.tentative.html.ini198
-rw-r--r--tests/wpt/metadata/html/semantics/popovers/popover-types-with-hints.tentative.html.ini6
-rw-r--r--tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini4
-rw-r--r--tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini3
-rw-r--r--tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini90
-rw-r--r--tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini3
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini7
-rw-r--r--tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini3
-rw-r--r--tests/wpt/metadata/url/urlsearchparams-delete.any.js.ini6
-rw-r--r--tests/wpt/metadata/url/urlsearchparams-has.any.js.ini8
-rw-r--r--tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini2
-rw-r--r--tests/wpt/metadata/webmessaging/with-ports/018.html.ini4
-rw-r--r--tests/wpt/metadata/webmessaging/without-ports/017.html.ini4
-rw-r--r--tests/wpt/web-platform-tests/.azure-pipelines.yml37
-rw-r--r--tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html35
-rw-r--r--tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html58
-rw-r--r--tests/wpt/web-platform-tests/credential-management/support/fedcm-mock.js3
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset-ref.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html25
-rw-r--r--tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-shorthand.html5
-rw-r--r--tests/wpt/web-platform-tests/css/css-break/transform-011.html16
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html11
-rw-r--r--tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003.html20
-rw-r--r--tests/wpt/web-platform-tests/css/css-contain/container-queries/container-units-content-box.html58
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix-ref.html8
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive-ref.html12
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic-ref.html6
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends-ref.html18
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic-ref.html6
-rw-r--r--tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-display/display-none-root-hit-test-crash.html9
-rw-r--r--tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html1
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed-ref.html29
-rw-r--r--tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-2.html4
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering.html6
-rw-r--r--tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html8
-rw-r--r--tests/wpt/web-platform-tests/css/css-nesting/conditional-rules-ref.html37
-rw-r--r--tests/wpt/web-platform-tests/css/css-nesting/conditional-rules.html47
-rw-r--r--tests/wpt/web-platform-tests/css/css-nesting/invalid-inner-rules.html10
-rw-r--r--tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-scroll-anchoring/fragment-scrolling-anchors.html8
-rw-r--r--tests/wpt/web-platform-tests/css/css-scroll-snap/snap-on-focus.html3
-rw-r--r--tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-ref.html (renamed from tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html)0
-rw-r--r--tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-text-decor/crashtests/text-decoration-on-pseudo-first-line-crash.html12
-rw-r--r--tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2-ref.html12
-rw-r--r--tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2.html17
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-computed.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html3
-rw-r--r--tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/3d-transform-incoming.html2
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-new.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-old.html35
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-ref.html19
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-new.html52
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-old.html52
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-ref.html33
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-new.html36
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-old.html36
-rw-r--r--tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-ref.html20
-rw-r--r--tests/wpt/web-platform-tests/css/cssom-view/scrollIntoView-smooth.html27
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/background-image-blur-repaint.html2
-rw-r--r--tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-ref.html (renamed from tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-expected.html)0
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001-ref.html13
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001.html10
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-002-ref.html5
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-003-ref.html5
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-004-ref.html5
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005-ref.html13
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005.html4
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002.html27
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004-ref.html27
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002.html27
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003.html28
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004-ref.html27
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html30
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001.html28
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002.html28
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003.html30
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001.html30
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001-ref.html25
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002-ref.html24
-rw-r--r--tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002.html29
-rw-r--r--tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html2
-rw-r--r--tests/wpt/web-platform-tests/css/printing/transform-001-print-ref.html8
-rw-r--r--tests/wpt/web-platform-tests/css/printing/transform-001-print.html11
-rw-r--r--tests/wpt/web-platform-tests/custom-elements/connected-callbacks-template.html33
-rw-r--r--tests/wpt/web-platform-tests/custom-elements/overwritten-customElements-global.html61
-rw-r--r--tests/wpt/web-platform-tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html116
-rw-r--r--tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-call.tentative.html42
-rw-r--r--tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html137
-rw-r--r--tests/wpt/web-platform-tests/dom/abort/abort-signal-any.any.js (renamed from tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js)0
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html4
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html2
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html34
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html10
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html8
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html12
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html8
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html4
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/resolve-to-config-promise.https.html80
-rw-r--r--tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js27
-rw-r--r--tests/wpt/web-platform-tests/fs/script-tests/FileSystemBaseHandle-buckets.js19
-rw-r--r--tests/wpt/web-platform-tests/fs/script-tests/FileSystemWritableFileStream-write.js13
-rw-r--r--tests/wpt/web-platform-tests/html-aam/roles.html2
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html14
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.clear.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.darker.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.default.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.get.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.highlight.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.over.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html73
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html231
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html627
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html87
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html75
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html65
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html75
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html195
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html209
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.value.html61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter-expected.html)7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation.html)14
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html)7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html)11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html)9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.html4
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter-expected.html)7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.html)13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow-expected.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow.html)16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation-expected.html)5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states-expected.html)5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex-expected.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.butt.html71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.closed.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.invalid.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.open.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.round.html79
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.square.html71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.valid.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cross.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.defaults.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.bevel.html109
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.closed.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.invalid.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.miter.html69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.open.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.parallel.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.round.html105
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.valid.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.acute.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.invalid.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.valid.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.within.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.union.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.basic.html75
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.invalid.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.transformed.html79
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.valid.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.default.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.empty.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.end.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.negative.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html103
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html99
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html67
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.beginPath.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html167
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.empty.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.intersect.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.empty.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.newline.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.overlap.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.initial.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.basic.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.closed.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.2.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.negative.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.winding.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html181
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.empty.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.skew.html81
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.union.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.basic.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.changing.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html99
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html107
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html173
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html167
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/reset/2d.reset.basic.html21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.order.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.basic.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.large.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.negative.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.zero.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html163
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.identity.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html163
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.basic.html13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/video/2d.video.invalid.html11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html75
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html82
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js79
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html240
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js237
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html72
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js64
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html74
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html74
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html76
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js68
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html636
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js634
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html62
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html64
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html96
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js93
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html84
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js91
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html78
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js73
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html52
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html76
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html84
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js91
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html204
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js201
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html52
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html222
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js217
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.html74
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.worker.js69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.html)14
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html)12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html)7
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html)11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html)11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html4
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html4
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter-expected.html)8
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.html)13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow-expected.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.html)16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html)16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html)12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation-expected.html)5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html)14
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html58
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html58
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html57
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html53
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html (renamed from tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states-expected.html)5
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html (renamed from tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html)10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html3
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html6
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html1
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html84
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js79
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html88
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js85
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html84
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js79
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html122
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js117
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html52
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html78
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js75
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.html52
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.html118
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js113
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html62
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html88
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js83
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html62
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js59
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html88
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js85
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html108
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js109
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js60
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html10
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html104
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js105
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html72
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html70
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html172
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js173
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.pngbin0 -> 205 bytes
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js13
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html8
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html16
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html68
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html68
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js69
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html70
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html70
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js71
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js51
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js55
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html40
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html186
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js187
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html8
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html8
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.pngbin0 -> 205 bytes
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html61
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js58
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html65
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js62
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html90
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js91
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html47
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html44
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html48
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html14
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js11
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html108
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js105
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js43
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html116
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js113
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html42
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html72
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js67
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html38
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html68
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js65
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html20
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js17
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html30
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js27
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html54
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js49
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html176
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js173
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html12
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js9
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html36
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js33
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js39
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html18
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js15
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html28
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js25
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js35
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html50
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js45
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html26
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js23
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html172
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js169
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html24
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js21
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html172
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js169
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html66
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js63
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html22
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js19
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html46
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js41
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html34
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js31
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html32
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js29
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py37
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml88
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/compositing.yaml68
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml909
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml149
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/path-objects.yaml (renamed from tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/path-objects.yaml)0
-rw-r--r--tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/path-objects.yaml3073
-rw-r--r--tests/wpt/web-platform-tests/html/embedded-content/the-img-element/attr-img-fetchpriority.html2
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/widgets/input-checkbox-no-centering.html19
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/widgets/input-no-centering-ref.html2
-rw-r--r--tests/wpt/web-platform-tests/html/rendering/widgets/input-radio-no-centering.html19
-rw-r--r--tests/wpt/web-platform-tests/html/scripting/the-script-element/attr-script-fetchpriority.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-disabled.tentative.html28
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html52
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tab-navigation.tentative.html33
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tabindex-order.tentative.html33
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-all-elements.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html12
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-css-properties.tentative.html54
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-events.html20
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.html36
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html19
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-hide-crash.html25
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-hover-hide.tentative.html129
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html16
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.html5
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-action-hover.tentative.html180
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-types-with-hints.tentative.html8
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/popover-types.html2
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/popovers/resources/popover-utils.js5
-rw-r--r--tests/wpt/web-platform-tests/html/semantics/the-link-element/attr-link-fetchpriority.html2
-rw-r--r--tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_tables01.html4
-rw-r--r--tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html4
-rw-r--r--tests/wpt/web-platform-tests/html/tools/README1
-rw-r--r--tests/wpt/web-platform-tests/html/tools/html5lib_tests_revision2
-rw-r--r--tests/wpt/web-platform-tests/lint.ignore1
-rw-r--r--tests/wpt/web-platform-tests/longtask-timing/META.yml4
-rw-r--r--tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js11
-rw-r--r--tests/wpt/web-platform-tests/longtask-timing/longtask-detach-frame.html25
-rw-r--r--tests/wpt/web-platform-tests/longtask-timing/longtask-promise.html36
-rw-r--r--tests/wpt/web-platform-tests/longtask-timing/resources/utils.js5
-rw-r--r--tests/wpt/web-platform-tests/page-visibility/resources/window_state_context.js66
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html211
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-timeline.html1
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset-ref.html44
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset.html73
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-animation.html3
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html50
-rw-r--r--tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-lookup.html96
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/navigation-timing.https.html1
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html19
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-credentialless-frame.html69
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html19
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js19
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html8
-rw-r--r--tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js19
-rw-r--r--tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html75
-rw-r--r--tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html83
-rw-r--r--tests/wpt/web-platform-tests/speculation-rules/prefetch/document-rules.https.html19
-rw-r--r--tests/wpt/web-platform-tests/storage/buckets/buckets_storage_policy.tentative.https.any.js25
-rw-r--r--tests/wpt/web-platform-tests/storage/buckets/resources/cached-resource.txt1
-rw-r--r--tests/wpt/web-platform-tests/storage/buckets/resources/util.js42
-rw-r--r--tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js58
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/manifest_build.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt4
-rw-r--r--tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/docker/requirements.txt2
-rw-r--r--tests/wpt/web-platform-tests/tools/gitignore/gitignore.py84
-rw-r--r--tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py18
-rw-r--r--tests/wpt/web-platform-tests/tools/lint/fnmatch.py17
-rw-r--r--tests/wpt/web-platform-tests/tools/lint/lint.py197
-rw-r--r--tests/wpt/web-platform-tests/tools/lint/rules.py52
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/XMLParser.py56
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/download.py46
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/item.py181
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/jsonlib.py57
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/log.py6
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/manifest.py163
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/sourcefile.py308
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/testpaths.py30
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py12
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/typedata.py114
-rwxr-xr-xtests/wpt/web-platform-tests/tools/manifest/update.py43
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/utils.py39
-rw-r--r--tests/wpt/web-platform-tests/tools/manifest/vcs.py103
-rw-r--r--tests/wpt/web-platform-tests/tools/requirements_flake8.txt11
-rw-r--r--tests/wpt/web-platform-tests/tools/requirements_mypy.txt4
-rw-r--r--tests/wpt/web-platform-tests/tools/requirements_pytest.txt2
-rw-r--r--tests/wpt/web-platform-tests/tools/requirements_tests.txt2
-rw-r--r--tests/wpt/web-platform-tests/tools/serve/serve.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/MANIFEST.in9
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/PKG-INFO60
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/README3
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum/LICENSE32
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum/README3
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum/__init__.py838
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum/doc/enum.rst735
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum/test.py1841
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/PKG-INFO62
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/SOURCES.txt13
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/dependency_links.txt1
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/top_level.txt1
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/setup.cfg4
-rw-r--r--tests/wpt/web-platform-tests/tools/third_party/enum/setup.py105
-rw-r--r--tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/error.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py6
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/browser.py105
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/requirements.txt2
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/requirements_install.txt1
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/run.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/testfiles.py90
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/tests/test_browser.py17
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/tests/test_install.py5
-rw-r--r--tests/wpt/web-platform-tests/tools/wpt/virtualenv.py6
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt3
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt2
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py19
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/content_shell.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py10
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py8
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorchrome.py61
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorcontentshell.py38
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_webkitgtk.py14
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/base.py4
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py9
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py2
-rw-r--r--tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py26
-rw-r--r--tests/wpt/web-platform-tests/tools/wptserve/tests/test_config.py5
-rw-r--r--tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py2
-rw-r--r--tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js9
-rw-r--r--tests/wpt/web-platform-tests/url/urlsearchparams-has.any.js13
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/__init__.py2
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console.py22
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console_args.py231
-rw-r--r--tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/realm.py32
-rw-r--r--tests/wpt/web-platform-tests/webmidi/idlharness.https.window.js4
-rw-r--r--tests/wpt/web-platform-tests/webtransport/streams-echo.https.any.js53
1820 files changed, 35693 insertions, 34809 deletions
diff --git a/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html.ini b/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html.ini
new file mode 100644
index 00000000000..4507c62946e
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html.ini
@@ -0,0 +1,2 @@
+[background-attachment-fixed-border-radius-offset.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini
new file mode 100644
index 00000000000..304b1579ca4
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/css-color/animation/opacity-animation-ending-correctly-001.html.ini
@@ -0,0 +1,2 @@
+[opacity-animation-ending-correctly-001.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata-layout-2020/css/css-color/color-mix-currentcolor-003.html.ini b/tests/wpt/metadata-layout-2020/css/css-color/color-mix-currentcolor-003.html.ini
new file mode 100644
index 00000000000..b61a5a16f2a
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/css-color/color-mix-currentcolor-003.html.ini
@@ -0,0 +1,2 @@
+[color-mix-currentcolor-003.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini b/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini
index 645e5380333..208aeeba2c0 100644
--- a/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini
+++ b/tests/wpt/metadata-layout-2020/css/css-flexbox/parsing/flex-flow-valid.html.ini
@@ -4,3 +4,6 @@
[e.style['flex-flow'\] = "nowrap column" should set the property value]
expected: FAIL
+
+ [e.style['flex-flow'\] = "nowrap" should set the property value]
+ expected: FAIL
diff --git a/tests/wpt/metadata-layout-2020/css/css-text-decor/text-shadow/standards-decor-noblur-2.html.ini b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-shadow/standards-decor-noblur-2.html.ini
new file mode 100644
index 00000000000..4fb4faa4282
--- /dev/null
+++ b/tests/wpt/metadata-layout-2020/css/css-text-decor/text-shadow/standards-decor-noblur-2.html.ini
@@ -0,0 +1,2 @@
+[standards-decor-noblur-2.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/MANIFEST.json b/tests/wpt/metadata/MANIFEST.json
index 171360f8363..7b54679069b 100644
--- a/tests/wpt/metadata/MANIFEST.json
+++ b/tests/wpt/metadata/MANIFEST.json
@@ -1709,6 +1709,15 @@
]
}
},
+ "css-display": {
+ "display-none-root-hit-test-crash.html": [
+ "b2467fa58fdb965f4097c447ce8a93391d80ef7d",
+ [
+ null,
+ {}
+ ]
+ ]
+ },
"css-flexbox": {
"column-intrinsic-size-aspect-ratio-crash.html": [
"595324845a2fee18427d9d7fdf813162ec43a5db",
@@ -3644,6 +3653,13 @@
null,
{}
]
+ ],
+ "text-decoration-on-pseudo-first-line-crash.html": [
+ "9b17dd9042a1525676ce236970255799babd9692",
+ [
+ null,
+ {}
+ ]
]
},
"text-decoration-line-spelling-error-001-crash.html": [
@@ -5480,6 +5496,13 @@
{}
]
],
+ "popover-hide-crash.html": [
+ "3e0c694976cd3798ffd319129c6b4494f5ee4267",
+ [
+ null,
+ {}
+ ]
+ ],
"popover-hint-crash.tentative.html": [
"82f83538e93e364dc90b45aa41515a586ea2089b",
[
@@ -29787,6 +29810,19 @@
{}
]
],
+ "transform-001-print.html": [
+ "f19b889d07ba01219b14b4a3c11c8ab545d10e20",
+ [
+ null,
+ [
+ [
+ "/css/printing/transform-001-print-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"transition-in-media-print.tentative.html": [
"54bac1f48124a27689dc2f614003d462fe2dd477",
[
@@ -129163,6 +129199,19 @@
{}
]
],
+ "background-attachment-fixed-border-radius-offset.html": [
+ "5d92bcb56a777e6f22f6a21179029bc2fc2d0f4b",
+ [
+ null,
+ [
+ [
+ "/css/css-backgrounds/background-attachment-fixed-border-radius-offset-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"background-attachment-fixed-inline-scrolled.html": [
"746997d6057ba1d2c109dafdfe7730ef149cd21e",
[
@@ -149173,6 +149222,19 @@
{}
]
],
+ "color-mix-currentcolor-003.html": [
+ "7d9b110aeb1685f3011f6a819935a550cde13f0b",
+ [
+ null,
+ [
+ [
+ "/css/css-color/color-mix-currentcolor-003-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"color-mix-non-srgb-001.html": [
"7563581a4cf6f8438e1ad9a8a25671c3f052ce79",
[
@@ -160370,7 +160432,7 @@
]
],
"descriptor-prefix.html": [
- "b9cf1b9bb1f19d4137a4ed0765eb1e118912e30a",
+ "ecf18420aad8be51888f21d0363f89053d7a4896",
[
null,
[
@@ -160630,7 +160692,7 @@
]
],
"system-additive.html": [
- "415f00a97458ee7967fa170f6caa94cd8d10e66b",
+ "74568bccd183ef48f35edd1dd5cdc8cb049fdfd2",
[
null,
[
@@ -160656,7 +160718,7 @@
]
],
"system-alphabetic.html": [
- "a986c54ac9f9f4c65dda9ead7ac44b8fab41e264",
+ "9447eaf940401aa3304634a5ba89d48b3c465ca0",
[
null,
[
@@ -160721,7 +160783,7 @@
]
],
"system-extends.html": [
- "a8f95323aa41f1a933e70bd1e3df553f28e89896",
+ "287930d0f607c0582d2069b045dfc0f6d78b39fa",
[
null,
[
@@ -160799,7 +160861,7 @@
]
],
"system-symbolic.html": [
- "99c1188c18e82e568cf32b126cf993b35e6d9737",
+ "a3ab8b1a98a34ed0cbd2525c3f2b61973b45999d",
[
null,
[
@@ -189051,6 +189113,19 @@
],
{}
]
+ ],
+ "masonry-rows-with-grid-width-changed.html": [
+ "3a1c4cfa9c065425d8de17dba157663f6024711c",
+ [
+ null,
+ [
+ [
+ "/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
]
},
"justify-content": {
@@ -192513,7 +192588,7 @@
]
],
"image-set-negative-resolution-rendering-2.html": [
- "d506c364e3b535286f0c146867afc942d6d9706c",
+ "c686b9a6940dd7847f09b7d8c313f76de18214ca",
[
null,
[
@@ -192526,12 +192601,12 @@
]
],
"image-set-negative-resolution-rendering.html": [
- "36fa08901ba264f61231495429ec774eb62d03a0",
+ "416b6929f28125b61a0e767770308706eeda850c",
[
null,
[
[
- "/css/reference/blank.html",
+ "/css/css-images/image-set/reference/image-set-rendering-ref.html",
"=="
]
],
@@ -210897,7 +210972,7 @@
]
],
"conditional-rules.html": [
- "be925d5d8733599e460449de5f64d373eb059357",
+ "55ecc1f9e49bca5524ef95ca6775b625971ec7a1",
[
null,
[
@@ -230036,12 +230111,12 @@
]
],
"table-child-percentage-height-with-border-box.html": [
- "7700b00dc3239245e38f90c72df944ef04a36998",
+ "1b798ff8c54cd36b821f62d0aec32d275a998da5",
[
null,
[
[
- "/css/css-sizing/table-child-percentage-height-with-border-box-expected.html",
+ "/css/css-sizing/table-child-percentage-height-with-border-box-ref.html",
"=="
]
],
@@ -251872,6 +251947,35 @@
{}
]
],
+ "standards-decor-noblur-2.html": [
+ "5b420da52b8aec6ab1ebd92b70f014e2fba6258c",
+ [
+ null,
+ [
+ [
+ "/css/css-text-decor/text-shadow/standards-decor-noblur-2-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 2
+ ],
+ [
+ 0,
+ 10
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
"standards-decor-noblur.html": [
"d5a2f4e0eea6d12e82612684d512240af3b7ea82",
[
@@ -279847,7 +279951,7 @@
},
"css-view-transitions": {
"3d-transform-incoming.html": [
- "b3726d4cd5131f413219d8dcc10ce3e5cce28f61",
+ "24ab886025ae5975868224f5f9b833ecd14831a1",
[
null,
[
@@ -279871,7 +279975,7 @@
],
[
0,
- 500
+ 515
]
]
]
@@ -280319,6 +280423,124 @@
}
]
],
+ "fractional-box-new.html": [
+ "407636b967b2e1c0aa6d437708a58cd14f3407e5",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "fractional-box-old.html": [
+ "915cd41704f369c8d24a82f797ea66be8f7ce093",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "fractional-box-with-overflow-children-new.html": [
+ "e50e6654a75578559cfb55ee972cb619a954a579",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-overflow-children-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-overflow-children-new.html",
+ "/css/css-view-transitions/fractional-box-with-overflow-children-ref.html",
+ "=="
+ ],
+ [
+ [
+ 0,
+ 3
+ ],
+ [
+ 0,
+ 100
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "fractional-box-with-overflow-children-old.html": [
+ "acf72e20df5c6e0dcee12f06e4088b31934753b0",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-overflow-children-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-overflow-children-old.html",
+ "/css/css-view-transitions/fractional-box-with-overflow-children-ref.html",
+ "=="
+ ],
+ [
+ [
+ 0,
+ 3
+ ],
+ [
+ 0,
+ 100
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "fractional-box-with-shadow-new.html": [
+ "820a48b1b0f85a9dc4c238082d4889db324e0347",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-shadow-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "fractional-box-with-shadow-old.html": [
+ "882f8992ade215679b18de817cc9ea9e70529357",
+ [
+ null,
+ [
+ [
+ "/css/css-view-transitions/fractional-box-with-shadow-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"fractional-translation-from-position.html": [
"a09b08cf00c554955ec4c4e041c169fe1575de43",
[
@@ -298208,12 +298430,12 @@
]
],
"background-image-blur-repaint.html": [
- "4a3c00c7ad334a67312346ce57aa81ac96d024d2",
+ "6ec81b6f5e821dd031e1a7130debcf4f99371b8b",
[
null,
[
[
- "/css/filter-effects/reference/background-image-blur-repaint-expected.html",
+ "/css/filter-effects/reference/background-image-blur-repaint-ref.html",
"=="
]
],
@@ -301539,7 +301761,7 @@
]
],
"offset-path-ray-contain-001.html": [
- "83e169298fa9f582e6c052c760a37a3b4cd66964",
+ "ba03f1115f6e782f558fbe4fcca0a89aa795e5fb",
[
null,
[
@@ -301591,7 +301813,7 @@
]
],
"offset-path-ray-contain-005.html": [
- "0ec0c25fb887e1087797cc7fa11f698a150dbfad",
+ "fc747027c6c51288bbbaf8623eaa461c823cb7f6",
[
null,
[
@@ -301603,6 +301825,323 @@
{}
]
],
+ "offset-path-shape-circle-001.html": [
+ "13df077df06f81bac68b537be14bbc04967bcecd",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-circle-001-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 200
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "offset-path-shape-circle-002.html": [
+ "8264abbbca0901c5b477a7075c29ad968bcf27ef",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-circle-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-circle-003.html": [
+ "eb00dacab30e1763ff0fed7405ee8a215001982d",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-circle-003-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 10
+ ],
+ [
+ 0,
+ 20
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "offset-path-shape-circle-004.html": [
+ "39e80fa861b10c0bfed22469f00d2c5a8f42daf2",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-circle-004-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-ellipse-001.html": [
+ "35482636ba169d221f852c6c0dcb3ca6e80cf145",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-ellipse-001-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 1
+ ],
+ [
+ 0,
+ 200
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "offset-path-shape-ellipse-002.html": [
+ "298e1dd52edb5c09ff8d369a488d6937e3bce404",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-ellipse-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-ellipse-003.html": [
+ "2b79367b0bcb2773dd295ea6d0bd627d05d3997c",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-ellipse-003-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-ellipse-004.html": [
+ "2c95415b11f266938c72363d6d4383121c7350fa",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-ellipse-004-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-inset-001.html": [
+ "dd96c42ebb33e585a9848e12b097dfadb82d7ccf",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-inset-001-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 30
+ ],
+ [
+ 0,
+ 200
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "offset-path-shape-inset-002.html": [
+ "6279cdd35ebe1c1e977c67b30733fe82524a56dd",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-inset-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-polygon-001.html": [
+ "7e9ccdbfda91bf82a30fe696dba6c8eb4fb3af1a",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-polygon-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-polygon-002.html": [
+ "39352f22be95b72c62ac942f224f756d2774bac4",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-polygon-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-polygon-003.html": [
+ "caa08082e4e879f93aa249d01c9971788513f2ae",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-polygon-003-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 20
+ ],
+ [
+ 0,
+ 50
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
+ "offset-path-shape-rect-001.html": [
+ "a8a2336cc81c8e9089d62a8d8b2773df8af91f3b",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-rect-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-rect-002.html": [
+ "c7b60b3660ba7332efa9a95d8b699ebba1cbea95",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-rect-002-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-xywh-001.html": [
+ "ace1ee1c639ca0dd612f54e2c08321ada3bf74d9",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-xywh-001-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "offset-path-shape-xywh-002.html": [
+ "65bf8aa2ee91543ce4ac81fcf132a3c83017f9bc",
+ [
+ null,
+ [
+ [
+ "/css/motion/offset-path-shape-xywh-002-ref.html",
+ "=="
+ ]
+ ],
+ {
+ "fuzzy": [
+ [
+ null,
+ [
+ [
+ 0,
+ 20
+ ],
+ [
+ 0,
+ 20
+ ]
+ ]
+ ]
+ ]
+ }
+ ]
+ ],
"offset-path-shape.html": [
"2750fd9f2fc2b63d50df63cbbf071577c8f24438",
[
@@ -306685,63 +307224,60 @@
{}
]
],
- "2d.layer.global-states.alpha.filter.globalcompositeoperation.html": [
- "54bafb9e65244d633d484d1583008f3c8b29663b",
+ "2d.layer.global-states.alpha.blending.html": [
+ "8e15a2b936417297761da7150e64d6ede9c4f8c6",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.alpha.filter.html": [
- "bf522c29457fc4a3bf36e7b0ff914a8508479834",
+ "2d.layer.global-states.alpha.blending.shadow.html": [
+ "22946174cdeac849a545dad2d1b44f0a7640a0e0",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.alpha.filter-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.alpha.filter.shadow.html": [
- "3b4727bfc34f1e4639c2d7e4c7d933fd1f401419",
+ "2d.layer.global-states.alpha.composite.html": [
+ "1ac6a2cbfe819e1d8b07d402b78585d27b85d5de",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 2
- ],
- [
- 0,
- 5824
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.alpha.composite.shadow.html": [
+ "c07e717a663ba67b0c9e37f4989ec050c9350d6b",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html",
+ "=="
]
- }
+ ],
+ {}
]
],
"2d.layer.global-states.alpha.html": [
- "10ef0e7b221553d58f28e189d106be8fa17af265",
+ "829796acbf9802f2dd8a81ef25d41d4d3448bad9",
[
null,
[
@@ -306754,7 +307290,7 @@
]
],
"2d.layer.global-states.alpha.shadow.html": [
- "a0f4d79a22380a5b14a257c0080c4173a721a55e",
+ "bcb7fe5096297ebccd6254845b4ac0524997bf11",
[
null,
[
@@ -306766,81 +307302,221 @@
{}
]
],
- "2d.layer.global-states.filter.globalcompositeoperation.html": [
- "1f23dba96cc378079365b1da8dbc1f84f4fd08f2",
+ "2d.layer.global-states.blending.html": [
+ "7d4d9ae4b5ba5ab2d5729122a5a727529a962bc1",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.blending-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.filter.html": [
- "7524ef56bb98e52e0af23b954759a31f3755b78a",
+ "2d.layer.global-states.blending.shadow.html": [
+ "80f414d4ee5e6ab5853fed1f94fdcd0f6c29146a",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.filter-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.filter.shadow.html": [
- "efa5dca2ae03e68b23abe5c3d642da86fa25c0dd",
+ "2d.layer.global-states.composite.html": [
+ "898d14992412b19391b2e5e6bd82d58c9ac83815",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.composite-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 1
- ],
- [
- 0,
- 49
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.composite.shadow.html": [
+ "9e32dddd40da4cd4361838bea19a29ea2550d90b",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html",
+ "=="
]
- }
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.html": [
+ "6f92e6d33f036aef7fb97eed1e186103a69fcb35",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.shadow.html": [
+ "68bdee684d3e03957553ef7c4709db5a9df7dce7",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.html": [
+ "72282d6559816e3ca6f830692d0dbec9e00e3f59",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.shadow.html": [
+ "71c99dba353e7ef318ca4c984cf8e0abccf20f8e",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.html": [
+ "9e687bcaf8a31d8ebb42b26a831dea2b45a0eb4a",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.shadow.html": [
+ "a9564c44a7cfe22f256b77a8c41187d28467b8a7",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.html": [
+ "a812563398e00719b3fb4ecca581dc56a69135f2",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.shadow.html": [
+ "bf30126ff2f8ebff98b58a754784f319aaff6599",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.html": [
+ "a2636d85255a56615e1e769bd2d93c7aacc8859c",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.shadow.html": [
+ "85b83b59b906e4268d29258eb3f4ebe35728ea64",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.no-global-states.html": [
+ "af495b21cd240aeebe4f55a75d6537194d04706d",
+ [
+ null,
+ [
+ [
+ "/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html",
+ "=="
+ ]
+ ],
+ {}
]
],
- "2d.layer.global-states.globalcompositeoperation.html": [
- "f27336adf4bbee1443e447360958ef35bf600fe9",
+ "2d.layer.global-states.filter.shadow.html": [
+ "2c692d6db76ba7f3d30d083ca124b1b203587dd0",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.no_global_states.html": [
- "93d2bdeb9276f283f15331cf562511b45dd90fd1",
+ "2d.layer.global-states.no-global-states.html": [
+ "d561be234103c400f17410bbeb02624e5722d962",
[
null,
[
[
- "/html/canvas/element/layers/2d.layer.global-states.no_global_states-expected.html",
+ "/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html",
"=="
]
],
@@ -306848,7 +307524,7 @@
]
],
"2d.layer.global-states.shadow.html": [
- "da78b3435c780cb63f0ee06c797cb08692552e60",
+ "bd9e868d1ef0f8e93060bc2601b3f1dbd6ac4566",
[
null,
[
@@ -306903,7 +307579,7 @@
]
],
"2d.layer.several-complex.html": [
- "f99357bd7fd1b6bf56cc05e37ba56badd9f6fadd",
+ "6ae78f690aeaac3b57502a91c56420e01232eaa8",
[
null,
[
@@ -307996,110 +308672,104 @@
{}
]
],
- "2d.layer.global-states.alpha.filter.globalcompositeoperation.html": [
- "88d339fb1b112763151ad8573f6edc082d2be611",
+ "2d.layer.global-states.alpha.blending.html": [
+ "bb7dd933372556976d06a0f4aac312ccf3874e94",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html": [
- "a95085ca8946cf8afb172dbc32218a458bf6e31f",
+ "2d.layer.global-states.alpha.blending.shadow.html": [
+ "70b32e43395d65654062d7471fe1cd7e77906964",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.alpha.filter.html": [
- "e8d3d5691bb4e7c04e2af9f34bcdd7447dc4bd77",
+ "2d.layer.global-states.alpha.blending.shadow.w.html": [
+ "45932d4cd5d182e47a6d588485ed1bde32f266c7",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.alpha.filter.shadow.html": [
- "07d5d793791dc923c681c79a97682b4dbe05cd5f",
+ "2d.layer.global-states.alpha.blending.w.html": [
+ "ff33fc450529c74a612c663b83d40e5a9df584ef",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 2
- ],
- [
- 0,
- 5824
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.alpha.composite.html": [
+ "21582189b1d800e96fed5317f92c23090092b0a7",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html",
+ "=="
]
- }
+ ],
+ {}
]
],
- "2d.layer.global-states.alpha.filter.shadow.w.html": [
- "40039c247d6507a442017081dd0fd349f16d5efb",
+ "2d.layer.global-states.alpha.composite.shadow.html": [
+ "bb3d886b54fb0ea2f836a991ab88200101269880",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 2
- ],
- [
- 0,
- 5824
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.alpha.composite.shadow.w.html": [
+ "592f92921b8b6fb97d833c0f2fad37efba7bf52e",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html",
+ "=="
]
- }
+ ],
+ {}
]
],
- "2d.layer.global-states.alpha.filter.w.html": [
- "177bae4e32d12b1ce0609c3c698c3beefa76a964",
+ "2d.layer.global-states.alpha.composite.w.html": [
+ "2359e92790fa03dc25a3fdb4b1a2a9ff74e8415a",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html",
"=="
]
],
@@ -308107,7 +308777,7 @@
]
],
"2d.layer.global-states.alpha.html": [
- "7064f47b20ab5287c2740bc97a93c5365f9b1ad9",
+ "67a8ae60249f12d79bb424abcec7258da5ce199b",
[
null,
[
@@ -308120,7 +308790,7 @@
]
],
"2d.layer.global-states.alpha.shadow.html": [
- "afbbac881e72dcb1780db420421e671478735a0f",
+ "a67f5872f78f204248ebd6dd5cea041f1a72d24a",
[
null,
[
@@ -308133,7 +308803,7 @@
]
],
"2d.layer.global-states.alpha.shadow.w.html": [
- "9e0e70993409dd2e0aebb706805ac2c35cad4860",
+ "35df72aabcd888df0e7b51e118aa931bd4db4a6f",
[
null,
[
@@ -308146,7 +308816,7 @@
]
],
"2d.layer.global-states.alpha.w.html": [
- "59d528b2099a48f5fe16a526a8f9bd28d3e1a50a",
+ "2db6b64738cb94c675146e298111e63763f1777e",
[
null,
[
@@ -308158,162 +308828,442 @@
{}
]
],
- "2d.layer.global-states.filter.globalcompositeoperation.html": [
- "b3ce2285dc922db002df6b50f55af48178efe509",
+ "2d.layer.global-states.blending.html": [
+ "6bcfd2854a607bbaddba85d8c07b4ebb01126dbf",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.filter.globalcompositeoperation.w.html": [
- "6d21ffb8157d775871685066fc07fcea09660947",
+ "2d.layer.global-states.blending.shadow.html": [
+ "f1e9b7d23a31ae4b3b50cad0bc0d6a16b64f9640",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.filter.html": [
- "a36a34d78e044eeea4760d419cf0a64c6c627fb4",
+ "2d.layer.global-states.blending.shadow.w.html": [
+ "1d22e94f6f9e7a9cbb025f9ba2ef246f90a24d85",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.filter.shadow.html": [
- "16439c60c68cf5d9dc6f36c5bfee89ae6a2fdb81",
+ "2d.layer.global-states.blending.w.html": [
+ "227c72b80ac676eaa38277e78a8479d432bb8c2a",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 1
- ],
- [
- 0,
- 49
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.composite.html": [
+ "9d4d1dce8a422ffc5125ece855e54ff9ee8aeb60",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html",
+ "=="
]
- }
+ ],
+ {}
]
],
- "2d.layer.global-states.filter.shadow.w.html": [
- "7abddb27c517f1b44aad901d1caa22b92e9c46ef",
+ "2d.layer.global-states.composite.shadow.html": [
+ "9ad39065c6a32facdbcd0b2cbf1b4383e1447757",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html",
"=="
]
],
- {
- "fuzzy": [
- [
- null,
- [
- [
- 0,
- 1
- ],
- [
- 0,
- 49
- ]
- ]
- ]
+ {}
+ ]
+ ],
+ "2d.layer.global-states.composite.shadow.w.html": [
+ "b45c9d3aadc678748d6982ca904b8e40e3e720fc",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html",
+ "=="
]
- }
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.composite.w.html": [
+ "66493889b20c5c7412cae395e40761b1597ec6c8",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.html": [
+ "37d0e3dd1c5543e400cc3a087fcc7437330c4149",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.shadow.html": [
+ "93278cb5aa380fb59c953a2f3d4c9c4460e05e98",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.shadow.w.html": [
+ "783693f2c1430e558d23b332d2e6b260bd325134",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.blending.w.html": [
+ "53533e4ece628306624a49e871ef9c5b4667ceea",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.html": [
+ "f0af85f8f51fa31982720f87ef4092d88870a29d",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.shadow.html": [
+ "46cd28b6c2b8b08875eb4621b283d2d994b26b5f",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.shadow.w.html": [
+ "044b75927b399edc9601c3c52159f628fb688073",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.composite.w.html": [
+ "be25ca66b169c6d873cfbfcac8ad28ba3ec36b22",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.html": [
+ "6567094376b6a31b375cfa08e6fe4e99991163fb",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.shadow.html": [
+ "3059bf306cd76531ca094ca4fea104af64b54b96",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.shadow.w.html": [
+ "a481073ccfc59b244c0af2ad11b88f3de6e74b2b",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.alpha.w.html": [
+ "b5d81078899bcdd88adf63e62a9c52a87ba66262",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.html": [
+ "a574e82932871d2ffb023962c4d32712cd766a65",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.shadow.html": [
+ "4bdf80337f8a93087c2530b6690dbd7b3e84d63e",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.shadow.w.html": [
+ "23cd4e834b04f23cca1dafee2659e24000a972ff",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.blending.w.html": [
+ "bd7a51d89877bb871c8532870549e5e47b3d4794",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.html": [
+ "663a953a29e2725f46b3a00acb711e150ae7d517",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.shadow.html": [
+ "52ad8646f01c2f58cad4e68ad116987cdd765a47",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.shadow.w.html": [
+ "bf7139edce6c23f2891d1fecb33ed4a9be622cdb",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.filter.composite.w.html": [
+ "1f30d1e5644f373683def54c618abd3f19a33aef",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html",
+ "=="
+ ]
+ ],
+ {}
]
],
- "2d.layer.global-states.filter.w.html": [
- "08e6c253562855709488d49737d47c9b82dafb1d",
+ "2d.layer.global-states.filter.no-global-states.html": [
+ "0619faa944ffea351f61b7cd4841b933895868a1",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.globalcompositeoperation.html": [
- "1be83170f116998212e66da401e1be9097336728",
+ "2d.layer.global-states.filter.no-global-states.w.html": [
+ "3a7168382006be4f6fbc4bd324b87532b578084f",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.globalcompositeoperation.w.html": [
- "7757aa5d8a95afff121c70055a54f3cd34683f6c",
+ "2d.layer.global-states.filter.shadow.html": [
+ "69120c105e5d17f1d5c6cbd1aa8a3d3a30948e0b",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.no_global_states.html": [
- "6769d47e7716f30eb047d9938b6825015fcd1258",
+ "2d.layer.global-states.filter.shadow.w.html": [
+ "8a770b2911e58e78b66a528bd92c25edb963af05",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html",
"=="
]
],
{}
]
],
- "2d.layer.global-states.no_global_states.w.html": [
- "7628d387e994fac5dde8f9a726edbc222aea950b",
+ "2d.layer.global-states.no-global-states.html": [
+ "022736c7b5b46c6eba7b22615cc166eaacf7accb",
[
null,
[
[
- "/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states-expected.html",
+ "/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
+ "2d.layer.global-states.no-global-states.w.html": [
+ "80ed4e4503d02b12b4c4b6e657935cd451510868",
+ [
+ null,
+ [
+ [
+ "/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html",
"=="
]
],
@@ -308321,7 +309271,7 @@
]
],
"2d.layer.global-states.shadow.html": [
- "87b8224f856acedb3d30342bba45a40adb646841",
+ "6402dc5760751d92a0642a1fd55285068fee7106",
[
null,
[
@@ -308334,7 +309284,7 @@
]
],
"2d.layer.global-states.shadow.w.html": [
- "b8d598887290da085ea03646b21d19e0ca317a71",
+ "e41e7aee4641bf6d32f5465c622daef21ffb5691",
[
null,
[
@@ -308431,7 +309381,7 @@
]
],
"2d.layer.several-complex.html": [
- "b4b2a8da602e6326af41c2b674d5fda8ef7b217f",
+ "1d50bd4de6160a6fce2fd641236cb7e086cc0d4f",
[
null,
[
@@ -308460,7 +309410,7 @@
]
],
"2d.layer.several-complex.w.html": [
- "5260cc2724d38f90a038410f3184e5a47ecb4a5a",
+ "7982a8dbc4fbbee7e3492f7fe269ea3046c30b4b",
[
null,
[
@@ -312567,6 +313517,19 @@
{}
]
],
+ "input-checkbox-no-centering.html": [
+ "7dba149c75f298cf40f4ace4ae9496f100f14305",
+ [
+ null,
+ [
+ [
+ "/html/rendering/widgets/input-no-centering-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"input-date-baseline-min-height.html": [
"86b552ab809bb77e0edee713daacab8869351941",
[
@@ -312619,6 +313582,19 @@
{}
]
],
+ "input-radio-no-centering.html": [
+ "6a714f8460016fa3612376f4f234900c65ac95bc",
+ [
+ null,
+ [
+ [
+ "/html/rendering/widgets/input-no-centering-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"input-time-content-size.html": [
"4a378f6923a8910b96f8afa84125a8fbac4a5d05",
[
@@ -319385,6 +320361,19 @@
},
"scroll-animations": {
"css": {
+ "scroll-animation-initial-offset.html": [
+ "34ae52d47927ee73c9c41c6f608bcd988e8f0cd7",
+ [
+ null,
+ [
+ [
+ "/scroll-animations/css/scroll-animation-initial-offset-ref.html",
+ "=="
+ ]
+ ],
+ {}
+ ]
+ ],
"scroll-timeline-default-iframe.html": [
"dbcf5941a85dfdb79f99066ae0225ab9c91db0f6",
[
@@ -326739,7 +327728,7 @@
},
"support": {
".azure-pipelines.yml": [
- "aacd78815adfd477ba3859cd2d28a3f4a3b5783d",
+ "20d5ec0f43152ab77fdc1ad6bcea32354db39541",
[]
],
".gitattributes": [
@@ -351731,7 +352720,7 @@
[]
],
"fedcm-mock.js": [
- "18634355b8ee39196f9ebf44105be2897961df95",
+ "cb48bdb27e846f50019741f33826586df377f75a",
[]
],
"fedcm-mojojs-helper.js": [
@@ -370668,6 +371657,10 @@
[]
]
},
+ "background-attachment-fixed-border-radius-offset-ref.html": [
+ "b912624b50b94d4ef6e8175d507e4f11cf740504",
+ []
+ ],
"background-attachment-fixed-inline-scrolled-ref.html": [
"1767c84a5f011cbe120cf1b46af2d5639ea00e28",
[]
@@ -373144,6 +374137,10 @@
"64e60fbf291285fe766cd68ec9204f295308ca5d",
[]
],
+ "color-mix-currentcolor-003-ref.html": [
+ "b47ee5942b80eef09cf2d1dbf32b20d325c0549c",
+ []
+ ],
"color-mix-non-srgb-001-ref.html": [
"15556737c7f8b10e80bcaec6bf550403050dd990",
[]
@@ -374976,7 +375973,7 @@
[]
],
"descriptor-prefix-ref.html": [
- "f106e616c5265740c73c56cbbe1fd5c42ad9a265",
+ "aa32f53639e99a502f8e0b53c4a8f22eeeb30d51",
[]
],
"descriptor-range-invalid-ref.html": [
@@ -375066,11 +376063,11 @@
[]
],
"system-additive-ref.html": [
- "993371307ae1a6b8d4d5c40014c56132c5fab5c7",
+ "b45ab5fcecf6774ea89eeb93bba9d41da99c9fea",
[]
],
"system-alphabetic-ref.html": [
- "b4a534beb830b6a00402235f0e839913ab2e0178",
+ "331d96ea4c83a4b17c77baa1503cb4b23ca66889",
[]
],
"system-common-invalid-ref.html": [
@@ -375094,7 +376091,7 @@
[]
],
"system-extends-ref.html": [
- "8105956ecb8dda46573e097ab43322416caa9449",
+ "c988310c25b8a251b6b302ab83d8b3f2dcd1f3ec",
[]
],
"system-fixed-ref.html": [
@@ -375106,7 +376103,7 @@
[]
],
"system-symbolic-ref.html": [
- "61b743f35885acf8fa38baf7878de43ef0546dda",
+ "7229c895ffc099d2f73667a5ca0abb31b40e8afd",
[]
]
},
@@ -386854,6 +387851,10 @@
"masonry-rows-item-placement-auto-flow-next-001-ref.html": [
"cbb3e825a4b76d28dc6e93b53eeeea1b5e40a118",
[]
+ ],
+ "masonry-rows-with-grid-width-changed-ref.html": [
+ "71c081f2cac1b1f358b484834ab0c5f8df68625c",
+ []
]
},
"justify-content": {
@@ -391019,7 +392020,7 @@
[]
],
"conditional-rules-ref.html": [
- "945ed30513682e619736986305b0506a46b8e694",
+ "c4fabd672a460391a919a6ffb4892ce232c6ab3d",
[]
],
"implicit-nesting-ref.html": [
@@ -394824,6 +395825,10 @@
"4e164672e20777062f222be66b3f394ec3b5f1a3",
[]
],
+ "table-child-percentage-height-with-border-box-ref.html": [
+ "b9d2418b18b5d7d604b8846a09e917903cc12aa2",
+ []
+ ],
"thin-element-render-ref.html": [
"0d5851d5544f9692d0761dc92c23b6b2b546b4d3",
[]
@@ -399697,6 +400702,10 @@
"9644146226609884b89148be28b35cf6d964e8b1",
[]
],
+ "standards-decor-noblur-2-ref.html": [
+ "47880c2ed62df6f844a9f6ef030fae60f0127c65",
+ []
+ ],
"standards-decor-noblur-ref.html": [
"8a962a41e923c50a6d891bc3f1b9c7bff3bbd180",
[]
@@ -403454,6 +404463,18 @@
"9e10b9b44e302a32f71c0fa7efac78eca9f0456a",
[]
],
+ "fractional-box-ref.html": [
+ "e5fb0f80d915242b7cbd5963f6efa5084be15675",
+ []
+ ],
+ "fractional-box-with-overflow-children-ref.html": [
+ "8e53dcd26633fbfbd8d069157523caef7321aab0",
+ []
+ ],
+ "fractional-box-with-shadow-ref.html": [
+ "639641aeb5b1ae5a92c085eef4689db39bbbe271",
+ []
+ ],
"fractional-translation-from-position-ref.html": [
"0674b265ac92566737e4c0ab0e86e93c4313579e",
[]
@@ -407143,7 +408164,7 @@
"9ce975c1ef631dc4e8e59c35fcacf6d9c7483b58",
[]
],
- "background-image-blur-repaint-expected.html": [
+ "background-image-blur-repaint-ref.html": [
"bf16d1fa2890af8d1bdb7b95b44af5bfff4dccaa",
[]
],
@@ -407689,29 +408710,97 @@
[]
],
"offset-path-ray-contain-001-ref.html": [
- "24a823f9ca37c1edd1006fe8645c4c72791a4e11",
+ "05f54d9dc55dff6159df20d226eaf0753f351385",
[]
],
"offset-path-ray-contain-002-ref.html": [
- "92ccb13af86a672ddc085809cbe36815a697e133",
+ "a5bff4467006fbaf3d3b1dd256bd416970eeb6d4",
[]
],
"offset-path-ray-contain-003-ref.html": [
- "3ad660eb2f2a2114d99a6d91a7a57146f6fece44",
+ "965960f20405e9e89dc08e5888620cd50056d8e5",
[]
],
"offset-path-ray-contain-004-ref.html": [
- "38b0d44fb1f0026e39c5201852faed50e77d0a66",
+ "188e2597c71fc505ec2e8c7e81d330aa7490f23c",
[]
],
"offset-path-ray-contain-005-ref.html": [
- "c1dafc477d3b1fd6f3bfda1ea198ee8a6245cb0f",
+ "ead5dfb8cdd6e3aaa1458e533acc8ec9a6be186d",
+ []
+ ],
+ "offset-path-shape-circle-001-ref.html": [
+ "7bc29af79c6ce74f1b7748f0234ac8346984e18e",
+ []
+ ],
+ "offset-path-shape-circle-002-ref.html": [
+ "e56acaaa260640da5bb0cfcaa4b0ecb1f7b7443d",
+ []
+ ],
+ "offset-path-shape-circle-003-ref.html": [
+ "327d325137c399499b681f6552750ff3d008968c",
+ []
+ ],
+ "offset-path-shape-circle-004-ref.html": [
+ "86c67dcdedcb2625216cd064384545113f2a96fc",
+ []
+ ],
+ "offset-path-shape-ellipse-001-ref.html": [
+ "32236bbc239a98c6a512d64037fcda32a8c5e976",
+ []
+ ],
+ "offset-path-shape-ellipse-002-ref.html": [
+ "e3dfaf51227d4d6d7028d9b455d4cd65e27a795d",
+ []
+ ],
+ "offset-path-shape-ellipse-003-ref.html": [
+ "4a9fed4c86ab7d08bbe1d32ff74d26e42f50e675",
+ []
+ ],
+ "offset-path-shape-ellipse-004-ref.html": [
+ "fca4b190db514034fd7b3647cebda99d25aae0dc",
+ []
+ ],
+ "offset-path-shape-inset-001-ref.html": [
+ "52a9662841c5d56c7655d11329d82f65ac9d17e9",
+ []
+ ],
+ "offset-path-shape-inset-002-ref.html": [
+ "28195129f3282fadc8a2e691321425f886eef6c3",
+ []
+ ],
+ "offset-path-shape-polygon-001-ref.html": [
+ "efaf54c79f2865155811f37de3648468b78541eb",
+ []
+ ],
+ "offset-path-shape-polygon-002-ref.html": [
+ "1e4c6c689b31e9628d7cb90076a9b0f096c10787",
+ []
+ ],
+ "offset-path-shape-polygon-003-ref.html": [
+ "0507f7b45ef022effb8fb8208792fcaa65f017fd",
+ []
+ ],
+ "offset-path-shape-rect-001-ref.html": [
+ "2cb45198e95e06406064d3b3de08d77a2997f570",
+ []
+ ],
+ "offset-path-shape-rect-002-ref.html": [
+ "7e9e07cccf3d26c8090ba98ee788565eca799b07",
[]
],
"offset-path-shape-ref.html": [
"a659b287fdab1ed7bda453c36c17140e0c2740f2",
[]
],
+ "offset-path-shape-xywh-001-ref.html": [
+ "12f9668dd5c8884368fe89104474d287bb04b28b",
+ []
+ ],
+ "offset-path-shape-xywh-002-ref.html": [
+ "1b672d1d98e712667d6c8d819f0c97c49985fc7b",
+ []
+ ],
"offset-path-string-ref.html": [
"5c5ff5f6f2ddc4696f2d51266199fe052464d9e6",
[]
@@ -407860,6 +408949,10 @@
[]
]
},
+ "transform-001-print-ref.html": [
+ "45c3abf1810a55dc760058bf5fcc3064f3bac188",
+ []
+ ],
"transition-in-media-print-ref.html": [
"2f25c06131e9372512e23ab9ff8428c594f74391",
[]
@@ -412307,7 +413400,7 @@
[]
],
"default-enabled-features-helper.js": [
- "d7eb3c63befde6b2f3eb96efb8d8c44ab7a7589a",
+ "821ebf69e367b2cd95edf2e736fc4d44008442d4",
[]
],
"default-enabled-features-redirect.https.html": [
@@ -415535,7 +416628,7 @@
[]
],
"FileSystemBaseHandle-buckets.js": [
- "01c41231808e2c18d707c0b4413c03d825918578",
+ "c06e940d7e9c5ab2c236c12e87f917f84e368004",
[]
],
"FileSystemBaseHandle-getUniqueId.js": [
@@ -415623,7 +416716,7 @@
[]
],
"FileSystemWritableFileStream-write.js": [
- "43c8ec7ca87d39cc96dea7b8557fac272bedafc4",
+ "a91a206b868250d486a6ec67a708dc8f4803ded6",
[]
],
"FileSystemWritableFileStream.js": [
@@ -418497,47 +419590,99 @@
[]
],
"2d.layer.global-states.alpha-expected.html": [
- "72d97c663f863ca503eeaa42d8d1a78fbd0f32a8",
+ "0666e3098a79e1b54d2155f9af1b6c0f18978f7e",
[]
],
- "2d.layer.global-states.alpha.filter-expected.html": [
- "b4512e2455e2062df69460a2910c30a50f48ec28",
+ "2d.layer.global-states.alpha.blending-expected.html": [
+ "8a450275889487c7975f14b1b203170ed5d9a089",
[]
],
- "2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html": [
- "ab7e6cc6c194a9471dab267b7fb6fde6b731eb39",
+ "2d.layer.global-states.alpha.blending.shadow-expected.html": [
+ "d7ba158d161d44ddd127fb10bf11f5bdef62dc51",
[]
],
- "2d.layer.global-states.alpha.filter.shadow-expected.html": [
- "857db7ba99191ba9af42b091753388975d5473fd",
+ "2d.layer.global-states.alpha.composite-expected.html": [
+ "951049e638c818182da1aa3ed3296a152dfb798f",
+ []
+ ],
+ "2d.layer.global-states.alpha.composite.shadow-expected.html": [
+ "a669a2271e96b8f4e5087bb9ffb1888a231a0c78",
[]
],
"2d.layer.global-states.alpha.shadow-expected.html": [
- "9daefc377bde8aa05b21689f89ff249924615dd7",
+ "206eb750139475dc0fada14fe27a040cb00f2fe4",
[]
],
- "2d.layer.global-states.filter-expected.html": [
- "cff8783b3921b7579bb87b038a063fe59be9158c",
+ "2d.layer.global-states.blending-expected.html": [
+ "33fdf46a28711a9c2a5fe88108fef23513a81f9b",
[]
],
- "2d.layer.global-states.filter.globalcompositeoperation-expected.html": [
- "12fc31209ac942878df5f9b2d81f8e6a1ecc2e70",
+ "2d.layer.global-states.blending.shadow-expected.html": [
+ "02275c8cc2150fac3bdc54f5000a44dc08299b69",
[]
],
- "2d.layer.global-states.filter.shadow-expected.html": [
- "6ec9b02f7cb4e5d7a0a1da41b0a5a45a777db53c",
+ "2d.layer.global-states.composite-expected.html": [
+ "ed7669c4cfabd17b7bf9e4302c4a65fdc4a7bb3a",
+ []
+ ],
+ "2d.layer.global-states.composite.shadow-expected.html": [
+ "e380cccab8245f77803000d4eb44dc956b3cf709",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha-expected.html": [
+ "f304700feb32ca8fdea1f0b2254dcd7f36735379",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.blending-expected.html": [
+ "7c91ce42293771932f84301de8d51d3c513c0d62",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.blending.shadow-expected.html": [
+ "d9c93719b9923dbe75f3135fd9bc7b91cfe56518",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.composite-expected.html": [
+ "8e0d98648ea721c720a678a161d0053d8d395cf8",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.composite.shadow-expected.html": [
+ "26d13a4cae95274c0edf26ab3e62f74857521fe3",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.shadow-expected.html": [
+ "9cc735fd42c1c01a69989eee514311cadf6cb5c3",
+ []
+ ],
+ "2d.layer.global-states.filter.blending-expected.html": [
+ "f81dcf72dc2e2d42e8bc7a1b26f72eed67972ae7",
+ []
+ ],
+ "2d.layer.global-states.filter.blending.shadow-expected.html": [
+ "a48485f7e8a1b9b843a8f6324ea822aa81abde93",
+ []
+ ],
+ "2d.layer.global-states.filter.composite-expected.html": [
+ "97e85a1593b63c24fb7b708b5c28fdc3beb85a0f",
+ []
+ ],
+ "2d.layer.global-states.filter.composite.shadow-expected.html": [
+ "79191ee3910f49c9f69a2454940d8ca88ef7eb78",
+ []
+ ],
+ "2d.layer.global-states.filter.no-global-states-expected.html": [
+ "e56fe0b3602d05f394436482449ba3387e0e4ca4",
[]
],
- "2d.layer.global-states.globalcompositeoperation-expected.html": [
- "7e2e021b552e5ab6d6007caa3fbe01f3d5a4bea6",
+ "2d.layer.global-states.filter.shadow-expected.html": [
+ "59cf16fa87d6dbc3c73f9dae81452889cc5e33eb",
[]
],
- "2d.layer.global-states.no_global_states-expected.html": [
- "139ff8ac944e5a84a3d98045036edb3c92f9f1b0",
+ "2d.layer.global-states.no-global-states-expected.html": [
+ "b91a2ae8b52c2570325c951df61003c3989aaf70",
[]
],
"2d.layer.global-states.shadow-expected.html": [
- "6787bdd1e50496f3cb05bcbecb2ffb29854e0442",
+ "ba56644d6c233415f147cb6c17911df099b0446a",
[]
],
"2d.layer.nested-expected.html": [
@@ -418549,7 +419694,7 @@
[]
],
"2d.layer.several-complex-expected.html": [
- "1944ea6d2ac8f11f3c17d4114070547c5c8ccb73",
+ "84ad6244740e997d62cd0bdf4f017a7a6c15d713",
[]
]
},
@@ -419295,47 +420440,99 @@
[]
],
"2d.layer.global-states.alpha-expected.html": [
- "72d97c663f863ca503eeaa42d8d1a78fbd0f32a8",
+ "0666e3098a79e1b54d2155f9af1b6c0f18978f7e",
[]
],
- "2d.layer.global-states.alpha.filter-expected.html": [
- "b4512e2455e2062df69460a2910c30a50f48ec28",
+ "2d.layer.global-states.alpha.blending-expected.html": [
+ "8a450275889487c7975f14b1b203170ed5d9a089",
[]
],
- "2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html": [
- "ab7e6cc6c194a9471dab267b7fb6fde6b731eb39",
+ "2d.layer.global-states.alpha.blending.shadow-expected.html": [
+ "d7ba158d161d44ddd127fb10bf11f5bdef62dc51",
[]
],
- "2d.layer.global-states.alpha.filter.shadow-expected.html": [
- "857db7ba99191ba9af42b091753388975d5473fd",
+ "2d.layer.global-states.alpha.composite-expected.html": [
+ "951049e638c818182da1aa3ed3296a152dfb798f",
+ []
+ ],
+ "2d.layer.global-states.alpha.composite.shadow-expected.html": [
+ "a669a2271e96b8f4e5087bb9ffb1888a231a0c78",
[]
],
"2d.layer.global-states.alpha.shadow-expected.html": [
- "9daefc377bde8aa05b21689f89ff249924615dd7",
+ "206eb750139475dc0fada14fe27a040cb00f2fe4",
[]
],
- "2d.layer.global-states.filter-expected.html": [
- "cff8783b3921b7579bb87b038a063fe59be9158c",
+ "2d.layer.global-states.blending-expected.html": [
+ "33fdf46a28711a9c2a5fe88108fef23513a81f9b",
[]
],
- "2d.layer.global-states.filter.globalcompositeoperation-expected.html": [
- "12fc31209ac942878df5f9b2d81f8e6a1ecc2e70",
+ "2d.layer.global-states.blending.shadow-expected.html": [
+ "02275c8cc2150fac3bdc54f5000a44dc08299b69",
[]
],
- "2d.layer.global-states.filter.shadow-expected.html": [
- "6ec9b02f7cb4e5d7a0a1da41b0a5a45a777db53c",
+ "2d.layer.global-states.composite-expected.html": [
+ "ed7669c4cfabd17b7bf9e4302c4a65fdc4a7bb3a",
+ []
+ ],
+ "2d.layer.global-states.composite.shadow-expected.html": [
+ "e380cccab8245f77803000d4eb44dc956b3cf709",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha-expected.html": [
+ "f304700feb32ca8fdea1f0b2254dcd7f36735379",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.blending-expected.html": [
+ "7c91ce42293771932f84301de8d51d3c513c0d62",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.blending.shadow-expected.html": [
+ "d9c93719b9923dbe75f3135fd9bc7b91cfe56518",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.composite-expected.html": [
+ "8e0d98648ea721c720a678a161d0053d8d395cf8",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.composite.shadow-expected.html": [
+ "26d13a4cae95274c0edf26ab3e62f74857521fe3",
+ []
+ ],
+ "2d.layer.global-states.filter.alpha.shadow-expected.html": [
+ "9cc735fd42c1c01a69989eee514311cadf6cb5c3",
[]
],
- "2d.layer.global-states.globalcompositeoperation-expected.html": [
- "7e2e021b552e5ab6d6007caa3fbe01f3d5a4bea6",
+ "2d.layer.global-states.filter.blending-expected.html": [
+ "f81dcf72dc2e2d42e8bc7a1b26f72eed67972ae7",
[]
],
- "2d.layer.global-states.no_global_states-expected.html": [
- "139ff8ac944e5a84a3d98045036edb3c92f9f1b0",
+ "2d.layer.global-states.filter.blending.shadow-expected.html": [
+ "a48485f7e8a1b9b843a8f6324ea822aa81abde93",
+ []
+ ],
+ "2d.layer.global-states.filter.composite-expected.html": [
+ "97e85a1593b63c24fb7b708b5c28fdc3beb85a0f",
+ []
+ ],
+ "2d.layer.global-states.filter.composite.shadow-expected.html": [
+ "79191ee3910f49c9f69a2454940d8ca88ef7eb78",
+ []
+ ],
+ "2d.layer.global-states.filter.no-global-states-expected.html": [
+ "e56fe0b3602d05f394436482449ba3387e0e4ca4",
+ []
+ ],
+ "2d.layer.global-states.filter.shadow-expected.html": [
+ "59cf16fa87d6dbc3c73f9dae81452889cc5e33eb",
+ []
+ ],
+ "2d.layer.global-states.no-global-states-expected.html": [
+ "b91a2ae8b52c2570325c951df61003c3989aaf70",
[]
],
"2d.layer.global-states.shadow-expected.html": [
- "6787bdd1e50496f3cb05bcbecb2ffb29854e0442",
+ "ba56644d6c233415f147cb6c17911df099b0446a",
[]
],
"2d.layer.nested-expected.html": [
@@ -419347,7 +420544,7 @@
[]
],
"2d.layer.several-complex-expected.html": [
- "1944ea6d2ac8f11f3c17d4114070547c5c8ccb73",
+ "84ad6244740e997d62cd0bdf4f017a7a6c15d713",
[]
]
},
@@ -419359,6 +420556,16 @@
]
}
},
+ "path-objects": {
+ "2d.path.fill.overlap.png": [
+ "e2a35d48d4c4363294aec671a38cbd4b39c9a53c",
+ []
+ ],
+ "2d.path.stroke.overlap.png": [
+ "e2a35d48d4c4363294aec671a38cbd4b39c9a53c",
+ []
+ ]
+ },
"pixel-manipulation": {
"2d.imageData.put.alpha.png": [
"5428c65524eebf083e2772bd66b496eeb1c1745e",
@@ -419448,7 +420655,7 @@
[]
],
"gentestutilsunion.py": [
- "bb734b31c66477279b0fcee06ed812249e3a1a1c",
+ "e923a0777ba2127a84bcc251363b9d02ebc4aee2",
[]
],
"name2dir-canvas.yaml": [
@@ -419464,7 +420671,7 @@
[]
],
"templates-new.yaml": [
- "703af3c2cb3264a89715e5bd2902798e7ee790c4",
+ "0940471dd4d5f6244b9a08111a930367afb2f726",
[]
],
"templates.yaml": [
@@ -419485,10 +420692,6 @@
"e8c425042668653f6908e6cf25ad6bf658aeb2f5",
[]
],
- "path-objects.yaml": [
- "eec142c7692bc5fd14478fedcd4ed95c66a546cd",
- []
- ],
"shadows.yaml": [
"7a7c115a7c44d450fc60d2e5bbb544cc5c75d225",
[]
@@ -419515,10 +420718,6 @@
"43a67d54ab49dd5f5a2822f9fd6e8cc12e261c88",
[]
],
- "path-objects.yaml": [
- "9c70daf59fca7fd33ea0a2256b7d1ce19f1fb192",
- []
- ],
"shadows.yaml": [
"06e2681c72c3d3832ce07fa85ff0362cd0bd5d03",
[]
@@ -419543,7 +420742,7 @@
[]
],
"compositing.yaml": [
- "e808206bdab407172413dc1dd518e431da4677ea",
+ "0051f07db23132b0c2ad174dd1ae5918bf9110d6",
[]
],
"conformance_requirements.yaml": [
@@ -419551,7 +420750,7 @@
[]
],
"drawing-images-to-the-canvas.yaml": [
- "4442f1ad481d65677b38b01616fc189ec6977d7c",
+ "e1837342e6a54d8a88b82af2982edb962d805575",
[]
],
"drawing-rectangles-to-the-canvas.yaml": [
@@ -419563,13 +420762,17 @@
[]
],
"layers.yaml": [
- "6889e164bfb32d860deadde3b4b3e6a3e3dc2352",
+ "d398ef2b5a2a62aed4d675a2cb71b9d7a5e805e1",
[]
],
"line-styles.yaml": [
"604f4f3659a40b89b05f1bce3968f2580dce3c6f",
[]
],
+ "path-objects.yaml": [
+ "eec142c7692bc5fd14478fedcd4ed95c66a546cd",
+ []
+ ],
"pixel-manipulation.yaml": [
"b9bdf3d2bdb5ca065b7bf58e35c30c09e8ac9405",
[]
@@ -425349,6 +426552,10 @@
"18019c56b1bd2535b998c05f301fca3abc8ae1bb",
[]
],
+ "input-no-centering-ref.html": [
+ "5b2ea91fe5fa635c221adc8801605f3b14fb66c7",
+ []
+ ],
"input-radio-disabled-checked-notref.html": [
"987e03cd92d7824e61cc75bbd723bd9583ab8fe1",
[]
@@ -427525,7 +428732,7 @@
[]
],
"popover-utils.js": [
- "ee69ca1e0166df2a24ab804aeb0b4d6a8594921e",
+ "39de6aa99b1fc810f5025f6c2d0e50780b4c6130",
[]
]
}
@@ -430302,6 +431509,10 @@
}
},
"tools": {
+ "README": [
+ "2ebde65fcdf62dd8b969e3fa4a573c4132d5ed2c",
+ []
+ ],
"html5lib_python_revision": [
"e0f5dd464a69319dba58276270cd19d8a6705f5c",
[]
@@ -430315,7 +431526,7 @@
[]
],
"html5lib_tests_revision": [
- "dae44a04416d95dc79736dbaca6a9669ad6d4e33",
+ "4af32678e53777b483da7b3397f516e1fa3ee1a9",
[]
],
"update_html5lib_tests.py": [
@@ -433419,7 +434630,7 @@
]
},
"lint.ignore": [
- "6f8ec10470ba416e3e282ddfa3afc97354e66650",
+ "7118adb16114c8ae8b9da512470fb94124f5b8cb",
[]
],
"loading": {
@@ -433682,7 +434893,7 @@
},
"longtask-timing": {
"META.yml": [
- "91c07f9fd3f3097367f2ad87a2ebb0d98b11d4e2",
+ "357ab18b24b5d48a5d20b2fe2f524c6d7c527a29",
[]
],
"resources": {
@@ -433703,7 +434914,7 @@
[]
],
"utils.js": [
- "7bb37bab32c181f3138b2ea9ea7ff84f306be3d4",
+ "5498aa9a7b92e70a90c105a2df17bc6ea2b108b6",
[]
]
},
@@ -436255,7 +437466,7 @@
[]
],
"window_state_context.js": [
- "fa96bf3b760ea95d2eb04a322a9ee15680a2caa0",
+ "844c440812cfdd0a58a53269e3d4c39df51de804",
[]
]
}
@@ -440562,6 +441773,10 @@
[]
]
},
+ "scroll-animation-initial-offset-ref.html": [
+ "8e6907860ba13eeb70b6cd94759ebaea4e68cb29",
+ []
+ ],
"scroll-timeline-default-iframe-ref.html": [
"1ab5646c8bddbec83b29c3d335b0e33fb1a3465c",
[]
@@ -442835,20 +444050,24 @@
"835046d472b2b3bb46aa7e4cba2976d367b29894",
[]
],
+ "partitioned-cookies-3p-credentialless-frame.html": [
+ "3fdf937ae1a7f6feff8db0b2905353721cfd503a",
+ []
+ ],
"partitioned-cookies-3p-frame.html": [
- "d3962d2e600fea05c445f8f0b5aeb2cd08c0fab8",
+ "6a8ed6ca989f1eeb2c9d46d8aaf0e202f0995e31",
[]
],
"partitioned-cookies-3p-sw.js": [
- "2f54a984b19c45563c4eb0ec99f4dfa0ef0f7e32",
+ "bc2a2831568f4cc438933b88b7cad6997beb041b",
[]
],
"partitioned-cookies-3p-window.html": [
- "d86a5eb20971900a5ae1b22f38c268d1c743b5d7",
+ "8e90609da22fcd87e90a2c4fe9b7561d9ba525de",
[]
],
"partitioned-cookies-sw.js": [
- "2f54a984b19c45563c4eb0ec99f4dfa0ef0f7e32",
+ "bc2a2831568f4cc438933b88b7cad6997beb041b",
[]
],
"partitioned-service-worker-iframe-claim.html": [
@@ -444541,8 +445760,12 @@
[]
],
"resources": {
+ "cached-resource.txt": [
+ "c57eff55ebc0c54973903af5f72bac72762cf4f4",
+ []
+ ],
"util.js": [
- "50abce14cdc520f81178d452d6f165e9401bfbd0",
+ "425303ce2c9c0a490468c3a002609abcad75ad5f",
[]
]
}
@@ -446017,7 +447240,7 @@
[]
],
"manifest_build.py": [
- "25a1a5f7402ce48efa357436b9573ad7d923116c",
+ "6d93a35258398ef98e8f74d107dbb0e0cf171216",
[]
],
"regen_certs.py": [
@@ -446029,7 +447252,7 @@
[]
],
"requirements_tc.txt": [
- "67e46ed204c0c6ee83d6ac674d00ae7116333c43",
+ "5c14ac4d40ac766cec96c79aa4f5ed77c92fc128",
[]
],
"run_tc.py": [
@@ -446058,7 +447281,7 @@
[]
],
"github_checks_output.py": [
- "e982ca33d01438ed17b8e5b1a535175981fab652",
+ "a334d39eec487bd8bcf27b6643df2fa3869cd417",
[]
],
"sink_task.py": [
@@ -446161,7 +447384,7 @@
[]
],
"requirements.txt": [
- "7c45f769eea25db52a7d24f2fc0c606f0d27e3fb",
+ "fee00749e854e4f0e04306f8c6638f76d355572d",
[]
],
"retry.py": [
@@ -446187,7 +447410,7 @@
[]
],
"gitignore.py": [
- "2e41a9fc65501b32cce2da23e54e24ea7f1e2739",
+ "68c2a0835ec8f864c45e4e4b6bb5e1b8cbf37544",
[]
],
"tests": {
@@ -446196,7 +447419,7 @@
[]
],
"test_gitignore.py": [
- "fa7c915d2b5a1cb81b94054aa3c5a3bad1cf4d94",
+ "61ad9fdc4e5d8df70128f25f590a41e66a52a6df",
[]
]
}
@@ -446211,15 +447434,15 @@
[]
],
"fnmatch.py": [
- "143cb436f2cb5e87807f3b8d6fe2e2a9493ed97f",
+ "4148ed75a90eb5597a98fe5bf3cd65b6520cf0b3",
[]
],
"lint.py": [
- "fbc663417fac7275e7fe78c078d72df16d818d04",
+ "9fc78d9b68e5e0cdaf432c2b914f00603a1961e7",
[]
],
"rules.py": [
- "d5876cdc269ee57bbd5874068a472f283c06ddde",
+ "88b7b6d80c360ec473b82a9bf3a1aefc7b9cc12e",
[]
],
"tests": {
@@ -446435,7 +447658,7 @@
],
"manifest": {
"XMLParser.py": [
- "21be8a26cd3f7748c8e86505083b31531ed17347",
+ "8dcdb4500721984ae004e9b4a0dd8ac5f6504f0a",
[]
],
"__init__.py": [
@@ -446453,23 +447676,23 @@
[]
],
"download.py": [
- "4a8b6fc3473a6f9ead86c34f11fd3d6172a7436f",
+ "8527fb232ac73ad8749a453e95d9d246b2695389",
[]
],
"item.py": [
- "f798ec2ae8d7fed1f39b1dee478e7645f0fdb4bf",
+ "500ca109a74e3ef37031fa51240b69626cfa59dd",
[]
],
"jsonlib.py": [
- "49eaf02e800755a02e6f6fa310b75d18adffd355",
+ "9c39d5b32ee19ecb540f92222fdc8be9d0676226",
[]
],
"log.py": [
- "6551c2b5f7cc0f61a85ef5ffb4bbc466a585b1ab",
+ "7881381733b805acefb0ce37179f0500ed224ded",
[]
],
"manifest.py": [
- "4b7792ec00a0fcd817580c694866aa0cd196a6ef",
+ "f602727cb09b393d9877a04591f56fc28854cfee",
[]
],
"requirements.txt": [
@@ -446477,11 +447700,11 @@
[]
],
"sourcefile.py": [
- "3919b5ac102d62581aef559e800e12e7c637a9d5",
+ "386833722e7d64675b85a495e9664e32a4eb3fab",
[]
],
"testpaths.py": [
- "6902f0c06336b975884cabc6ff9c2e614fedbdca",
+ "2fa5393826d640d94f9bca15fb51743c9ff6a4f6",
[]
],
"tests": {
@@ -446498,7 +447721,7 @@
[]
],
"test_manifest.py": [
- "73a6c7e1421c63cf21d956b86d21f24bacfbb328",
+ "91b39f213a8e526c8fd6abd3d308c2d539ef3855",
[]
],
"test_sourcefile.py": [
@@ -446511,19 +447734,19 @@
]
},
"typedata.py": [
- "4061c9e610b79d68bd1a36563a199a596313419c",
+ "746a42c98cf0bbc16022f870bc08816ec22258fa",
[]
],
"update.py": [
- "d7ef2082ebf8594f5da29101fe2bec02ce32255b",
+ "fef0b96b8691ba6dba30b02d2ed8cccfcc8a7937",
[]
],
"utils.py": [
- "59ddb66378481138ed6b53cf7cd7a98c5182eded",
+ "7ccd3afb71e7be219216eac7079f9271f454f2e0",
[]
],
"vcs.py": [
- "ec59f42a311eca8daacb57c7fa2fd2058d3f7bcf",
+ "554e68ab65fdb8c198589f6589a74c2d3d81d7c3",
[]
]
},
@@ -446536,19 +447759,19 @@
[]
],
"requirements_flake8.txt": [
- "93cacd43845159e81449e167ea4f767f449c7a17",
+ "949ae9548452582f5503bee37bb0a9965abf1647",
[]
],
"requirements_mypy.txt": [
- "af7de298c9fd41dc3220f7d98596050f38cab8e9",
+ "1044bca9407b8b401cabe83ef5eb57d2d011e035",
[]
],
"requirements_pytest.txt": [
- "5039de986ec357162f7502b4fca73d8608e70be4",
+ "4fcbab6c7024609f57c14979298d2538a38cfa36",
[]
],
"requirements_tests.txt": [
- "63f0b39b546840176d207bd32bb1a7733bcdde10",
+ "8a4b54f4dcdf4ee9f2590861408399dfe57fbf64",
[]
],
"runner": {
@@ -446615,7 +447838,7 @@
[]
],
"serve.py": [
- "52a0eae428de2d8abce85ff0ccac2bce3a7c1d7d",
+ "e5aa5f0d89683cec6c952841869418b00f24c2ec",
[]
],
"test_functional.py": [
@@ -447196,70 +448419,6 @@
[]
]
},
- "enum": {
- "MANIFEST.in": [
- "98fe77f55a2aa2f25aaae25847e4ddfd11e19964",
- []
- ],
- "PKG-INFO": [
- "623171e38f68fb27c2e4a5161f06575baf7e6d6a",
- []
- ],
- "README": [
- "aa2333d8df6f2b545febd3c53adf2f6108e8ce61",
- []
- ],
- "enum": {
- "LICENSE": [
- "9003b8850e7ef11e2e1dda0364370b82f4c769d6",
- []
- ],
- "README": [
- "aa2333d8df6f2b545febd3c53adf2f6108e8ce61",
- []
- ],
- "__init__.py": [
- "51f3cf247069fd673ea9702b80d8762431831826",
- []
- ],
- "doc": {
- "enum.rst": [
- "3afc238210b4f43f08bd0f0be422522242971244",
- []
- ]
- },
- "test.py": [
- "c8c4b962242f4f5a2ed24855a7e5a12df3dec6e6",
- []
- ]
- },
- "enum34.egg-info": {
- "PKG-INFO": [
- "98927c4d99d9ca2f7ac9aadcb23b5b0922f34206",
- []
- ],
- "SOURCES.txt": [
- "e6855e653cfe44e47557b395abadfdcfa6041375",
- []
- ],
- "dependency_links.txt": [
- "8b137891791fe96927ad78e64b0aad7bded08bdc",
- []
- ],
- "top_level.txt": [
- "e3caefb45c499808ce8bafc74fbcc2e6ab054602",
- []
- ]
- },
- "setup.cfg": [
- "8bfd5a12f85b8fbb6c058cf67dd23da690835ea0",
- []
- ],
- "setup.py": [
- "f54071e7f0c4c3eb9d3b68e11caa1ea72120c1a6",
- []
- ]
- },
"funcsigs": {
".gitignore": [
"c8d2af85d3c617aa3f2551349af10d61cff65c2a",
@@ -454533,7 +455692,7 @@
[]
],
"error.py": [
- "5a169aa9847429aa5ddb12b8e486714cbbdff2de",
+ "6a02e65ba5a88eb65e6aca6696ed4f5369910e99",
[]
],
"modules": {
@@ -454572,7 +455731,7 @@
[]
],
"error.py": [
- "1b67d3325ad8ce67fbd72b21b78535825eb7186a",
+ "7d5d914a20cb6cd90ff09e651328ce24356eec1d",
[]
],
"protocol.py": [
@@ -454635,7 +455794,7 @@
[]
],
"browser.py": [
- "7a046e8f07c5d5afc020011b1baa9bcf8a7229b4",
+ "e40739e4b74cff467d764ecaa27cd10024fd4167",
[]
],
"commands.json": [
@@ -454659,11 +455818,11 @@
[]
],
"requirements.txt": [
- "496696730aa702213f0a79b3d1831156c01407dd",
+ "becc27ff2e02f26b19133cd3224759d1e8578b79",
[]
],
"requirements_install.txt": [
- "5db7bce788c97c9de3ca4b1268bba3e0fcf89a3a",
+ "a299792b2230184017bb67f284f1271a5d485568",
[]
],
"revlist.py": [
@@ -454671,11 +455830,11 @@
[]
],
"run.py": [
- "72ceab08b9794e45a14db05e90794e608a6785d7",
+ "9a1111c59f6e5afa471f9b95e8101f36401dd3f4",
[]
],
"testfiles.py": [
- "74c97ceefe2e58746135e9cb516b6bb605e4b11c",
+ "e13b878cf2a607cf438aca1118fc48ac43969f9b",
[]
],
"tests": {
@@ -454738,11 +455897,11 @@
]
},
"test_browser.py": [
- "d1d31e509916c906b60a1d15637c13a4abb85d6d",
+ "b317925ba001abcf7612f61d105b886c43dafb81",
[]
],
"test_install.py": [
- "076db33e812ea3be4fe0abc9875cbb6720026c63",
+ "6726081746cd96140f3ea472b018ff30f76e8d11",
[]
],
"test_markdown.py": [
@@ -454783,7 +455942,7 @@
[]
],
"virtualenv.py": [
- "05ca52244c5bb0224d71a3badca8bbdef7f2bd0d",
+ "7176bafcde4b04477f9c26b8d45fc737b278073f",
[]
],
"wpt.py": [
@@ -454827,7 +455986,7 @@
]
},
"requirements.txt": [
- "c55bc6341019ca6cf9947cd6bcc314e3a9825ed6",
+ "abe5966197df9efad564c066717d09ea92ef3849",
[]
],
"requirements_chromium.txt": [
@@ -454855,7 +456014,7 @@
[]
],
"requirements_sauce.txt": [
- "0650e6655e954d6f49a7771065974937f59e8e11",
+ "9dd3989e0d88594cd74d98b337694a3831b9b196",
[]
],
"setup.py": [
@@ -454889,7 +456048,7 @@
[]
],
"chrome.py": [
- "2bcffbb5de4f5cdaf289873b9782cd5f6790fd6b",
+ "6946ccd4a6b597e2a460e4efcb3603594d7fbbb6",
[]
],
"chrome_android.py": [
@@ -454909,7 +456068,7 @@
[]
],
"content_shell.py": [
- "d729ebb6b362f67e88ef57aff462304e9f126118",
+ "04c0ca70c4c9313a2fb68d6b8f971d8252a11bbe",
[]
],
"edge.py": [
@@ -454945,7 +456104,7 @@
[]
],
"safari.py": [
- "3e4a6c8d4dc110cd74a341a4e8153ff682ac84e2",
+ "f7dcd55d62853c9768b8e0c83b8993f03adad674",
[]
],
"sauce.py": [
@@ -455001,15 +456160,15 @@
[]
],
"base.py": [
- "f62ded610ca4ed716e0a1378cc27b6acccb0e19b",
+ "3159bb3c3a2fbea5847aca9a58914cc58a6e2dd3",
[]
],
"executorchrome.py": [
- "030578c7b93ca60a9f9461e7dbb34cc972705d9b",
+ "a3a733efbd256cce6715685b05dce952102c22c0",
[]
],
"executorcontentshell.py": [
- "e00f25b003852f09013ebb9497a3d62903974773",
+ "d558ce07f4ab5527964bf4ee989af0078bf94ea4",
[]
],
"executormarionette.py": [
@@ -455041,7 +456200,7 @@
[]
],
"protocol.py": [
- "af64cc855e2126c1503ad4a83c2215a23abe416a",
+ "4cef0134027b31532434a12c1b9e4f1a4006ad2f",
[]
],
"pytestrunner": {
@@ -455132,7 +456291,7 @@
[]
],
"manifestupdate.py": [
- "0bc25187976ddd9f970506ff74f63b9720e62588",
+ "0088971795ef3abe18cc7754768510dddba2c264",
[]
],
"metadata.py": [
@@ -455214,7 +456373,7 @@
[]
],
"test_webkitgtk.py": [
- "370cd86293486a2d6fa5277524c64c2e96851285",
+ "5b751e945622f85e18286553f9791e579aecd6ca",
[]
]
},
@@ -455265,7 +456424,7 @@
[]
],
"base.py": [
- "bd39e23b867d3f00d78f731af7b0bd239579e65b",
+ "22ccde746fada99902b7c4d82a03dc7cf89c39f3",
[]
],
"metadata.py": [
@@ -455294,7 +456453,7 @@
[]
],
"wptcommandline.py": [
- "f64d17483d1a0bc9a9a7624ea43a2584fc83b1c4",
+ "416e75b417f607b1cbb1e1d5bdc3ebd736af67bd",
[]
],
"wptlogging.py": [
@@ -455316,7 +456475,7 @@
[]
],
"conditional.py": [
- "7d4f257f1ad205deae3f787ea1c5795d77fc34f6",
+ "695d6a3dcc47353e9406b26e0f1b4b0dd9f0612e",
[]
],
"static.py": [
@@ -455368,7 +456527,7 @@
[]
],
"wpttest.py": [
- "65577c1eabced979341854ea0c3b642bbe84f67a",
+ "492549d4e7f35df92a20736953a69d68ed527f3d",
[]
]
},
@@ -455648,7 +456807,7 @@
]
},
"test_config.py": [
- "9f84577c7fa956030214562952d289ab985baff9",
+ "c761b681552ae0137af528dabdab7121284f0b6a",
[]
],
"test_replacement_tokenizer.py": [
@@ -455690,7 +456849,7 @@
[]
],
"pipes.py": [
- "a9a85a136bdefe17693d642335b507ce727249af",
+ "84b17c1228530730700526cf705a7b6c7942494f",
[]
],
"ranges.py": [
@@ -458472,7 +459631,7 @@
],
"entry_added": {
"__init__.py": [
- "8a798f9dce2e1264996fd06e3b2febd31cedfa51",
+ "f77345c1b73e24d5caacf595565484b3b09b9ebb",
[]
]
}
@@ -477997,7 +479156,27 @@
"testdriver": true
}
]
- ]
+ ],
+ "shadowdom": {
+ "basic.html": [
+ "ca60986d337ca38865727fac3a3449fa3d2a719d",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "slot.html": [
+ "9155a2eef3bdfb6c02b03826c9038ebca42239e6",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ]
+ }
}
},
"acid": {
@@ -501485,7 +502664,7 @@
]
],
"border-shorthand.html": [
- "30491a534ec65abd673a80a278c3f6aa47f82220",
+ "487ce876fa51eec3bb7d10cdf48203809ef3a6a6",
[
null,
{}
@@ -502417,6 +503596,13 @@
{}
]
],
+ "transform-011.html": [
+ "58008e509ead3be32d8a4f14149dec44b6e47306",
+ [
+ null,
+ {}
+ ]
+ ],
"widows-orphans-005.html": [
"713849703ce92e062780bd20e0708c8dfcd21f5f",
[
@@ -503662,6 +504848,13 @@
{}
]
],
+ "container-units-content-box.html": [
+ "89a76e868ce5750f9739c4713da65701c9498277",
+ [
+ null,
+ {}
+ ]
+ ],
"container-units-in-at-container-dynamic.html": [
"c1f929241ca7018f636bfabf7072c1bfa549db6a",
[
@@ -506770,7 +507963,7 @@
]
],
"flex-flow-valid.html": [
- "6dc9d0ae2f61fa369f451049a05b87c01091fa95",
+ "8ce254f7b15b768b805e7970bc7896eecb2c286b",
[
null,
{}
@@ -511908,7 +513101,7 @@
]
],
"image-set-parsing.html": [
- "c33652a5fd21cbc2092df31df05fe23e7527f2bb",
+ "2f56fcf74b446b24fdf3bc86903324338ab37b7a",
[
null,
{}
@@ -513928,7 +515121,7 @@
]
],
"invalid-inner-rules.html": [
- "219dcac3f5628b3ad4474ac6bac04fe28b1fd2ce",
+ "ffb53420e2dacfead07094be6c8521f87633c9ed",
[
null,
{}
@@ -514465,7 +515658,7 @@
]
],
"overscroll-behavior.html": [
- "0bf335d770d8dcc0af0231a6b3bdb080fca07aa2",
+ "dcd981e92e2b64afd93a6a390450ed270bcc23c8",
[
null,
{
@@ -516549,7 +517742,7 @@
]
],
"fragment-scrolling-anchors.html": [
- "74b633be987ac6a2dd63ebab3ddb427836f78b7a",
+ "99c679acaa5822df3632c42fa5892c9a96686000",
[
null,
{}
@@ -517248,7 +518441,7 @@
]
],
"snap-on-focus.html": [
- "9b6f6f413e161cf689def1b054e27799ed6bc5ea",
+ "13709d2747a223929f17d7cb0e15d1b4f2152e57",
[
null,
{}
@@ -527445,7 +528638,7 @@
]
],
"calc-infinity-nan-computed.html": [
- "c99eef737cbb4c0b3ad42752378154cc399e397e",
+ "e10649be6ff1addac5ea824c33102de4e187277c",
[
null,
{}
@@ -527459,14 +528652,14 @@
]
],
"calc-infinity-nan-serialize-length.html": [
- "f0ae43679b2be9a711b3bf05dab7d4e04fa868b6",
+ "96b4c43e2d1f1458d576890c061691ee8348dc72",
[
null,
{}
]
],
"calc-infinity-nan-serialize-resolution.html": [
- "524aa163aab14aae6fcabc962122b921830e38e3",
+ "6548ea7ea750c972c51283b76a08fec10823b38f",
[
null,
{}
@@ -531098,7 +532291,7 @@
]
],
"scrollIntoView-smooth.html": [
- "70343cb42530147fe08575c7cd69912be8944213",
+ "ddfa31076c2bff7711ed493dbaec0943fd03ff87",
[
null,
{}
@@ -532108,7 +533301,7 @@
]
],
"offset-path-parsing-valid.html": [
- "25915b9a29ee454ddbde1e972e2a7f7d47ef4258",
+ "95a9f8aabbc96eed703d86c512a5206036dd8dac",
[
null,
{}
@@ -533829,6 +535022,13 @@
{}
]
],
+ "connected-callbacks-template.html": [
+ "ed404332dbd8b675e02cbc5448873bcee1114744",
+ [
+ null,
+ {}
+ ]
+ ],
"connected-callbacks.html": [
"d6e68262a850a9a952877264fdf64594e8025375",
[
@@ -534033,6 +535233,13 @@
{}
]
],
+ "overwritten-customElements-global.html": [
+ "dcb97b6652894e3a2d16d769c372d371145f0877",
+ [
+ null,
+ {}
+ ]
+ ],
"parser": {
"parser-constructs-custom-element-in-document-write.html": [
"14c830b9ba961e701ea39656f42a73cd638e65df",
@@ -534571,6 +535778,27 @@
null,
{}
]
+ ],
+ "ShadowRoot-innerHTML-upgrade.tentative.html": [
+ "e21c9dd03326d68976bffc99483d04edd1bb8145",
+ [
+ null,
+ {}
+ ]
+ ],
+ "constructor-call.tentative.html": [
+ "19a8e3f4d8ac690aef9903c492df7a2f8fe99fad",
+ [
+ null,
+ {}
+ ]
+ ],
+ "constructor-reentry-with-different-definition.tentative.html": [
+ "dc93e3c702d5789657f92d81294b378bcf37c6e4",
+ [
+ null,
+ {}
+ ]
]
},
"state": {
@@ -535185,10 +536413,10 @@
{}
]
],
- "abort-signal-any.tentative.any.js": [
+ "abort-signal-any.any.js": [
"b4abb14c1a3eff64cee0c171c1ca03cf89ccc9af",
[
- "dom/abort/abort-signal-any.tentative.any.html",
+ "dom/abort/abort-signal-any.any.html",
{
"script_metadata": [
[
@@ -535199,7 +536427,7 @@
}
],
[
- "dom/abort/abort-signal-any.tentative.any.worker.html",
+ "dom/abort/abort-signal-any.any.worker.html",
{
"script_metadata": [
[
@@ -557427,49 +558655,49 @@
]
],
"default-enabled-features-allow-all.https.html": [
- "faebeec26c482d6ddba19994bc801eb300109a7b",
+ "f5084cf3861e37a540ff5f23ea43c304be99e7db",
[
null,
{}
]
],
"default-enabled-features-allow-none.https.html": [
- "a338e00c874f1945b2ce1c017d701b1f8cbb71ef",
+ "d44cb5bca77d59d194bba1116003b137cb594307",
[
null,
{}
]
],
"default-enabled-features-allow-self.https.html": [
- "d59ee7fcdc82e48b4773ebb45d019bab97d712bf",
+ "0360963a0b8f8aec0df19084071137c9803df1de",
[
null,
{}
]
],
"default-enabled-features-attribute-allow.https.html": [
- "dd6dd4ec5022c7861b65e63ba4672630fe18c2dd",
+ "3c3831f0157de1235bead0c2c6f69170b1dc26da",
[
null,
{}
]
],
"default-enabled-features-attribute-change.https.html": [
- "179a8683e32c32007d54200db9e417e091f86d00",
+ "9878e615adbca66d52190a225c765c380c4bab9d",
[
null,
{}
]
],
"default-enabled-features-attribute-disallow.https.html": [
- "29fdc788bf5b7d92ffb343625c4624d5b15178f7",
+ "f9ef9b6db24676f420cd8ced98f47e8b6c19f646",
[
null,
{}
]
],
"default-enabled-features-attribution-disabled.https.html": [
- "7683b35a69942044f95c35f4861e520eaae9e7ba",
+ "9e037e24a3e042751c4b32a33030e094b8e8b045",
[
null,
{}
@@ -557483,7 +558711,7 @@
]
],
"default-enabled-features-unset.https.html": [
- "0e9c300bdcb95f24bd11cabe5db6e4b13f458eac",
+ "b438d1ff35ad934d653ac3375cbe954f3d22cc68",
[
null,
{}
@@ -558045,6 +559273,13 @@
}
]
],
+ "resolve-to-config-promise.https.html": [
+ "97df37ef2bc9f43abffb41ff4e88c72fe238f9be",
+ [
+ null,
+ {}
+ ]
+ ],
"sandbox-attribute.https.html": [
"1458145e4377e573f8aa13f5cb4d0dfdc7e09182",
[
@@ -580929,63 +582164,63 @@
]
],
"2d.composite.globalAlpha.canvas.html": [
- "2ae3d662f08c594665637f94896b0397a8fc4253",
+ "525a56ebc9d122c7049931c1c87784aff51fd690",
[
null,
{}
]
],
"2d.composite.globalAlpha.canvascopy.html": [
- "1f3e6299ba05f010deca392df34b8c868245a213",
+ "17a46cfca22e58401c1d783d1a26df28bb44b353",
[
null,
{}
]
],
"2d.composite.globalAlpha.canvaspattern.html": [
- "e861cddf302a0f6874e354d60bf3789dc70e348f",
+ "eea076c974dfcb7a12a84c0ce0dc3aff99b6f1fc",
[
null,
{}
]
],
"2d.composite.globalAlpha.default.html": [
- "a8aa19162afb7fa36be085755799ce4aafff509f",
+ "97cdf267c7c33e815955e2d5c5015fc70e656435",
[
null,
{}
]
],
"2d.composite.globalAlpha.fill.html": [
- "fce9b7fbfc391e1f909e5f52578597954eb8527a",
+ "5766fdbe77c8a29fd8233a6384dfd6c56cece80c",
[
null,
{}
]
],
"2d.composite.globalAlpha.image.html": [
- "deb13f34160cfec3d6ab42c6ee62b374dbea2e48",
+ "5de1d5ff3eee7376c2a5113d2f1ec456140de8ec",
[
null,
{}
]
],
"2d.composite.globalAlpha.imagepattern.html": [
- "06aea4c02958c8e4d6e8b0a53507750d63076735",
+ "87e884524e8318e0c83e7605c0261564a6a581c5",
[
null,
{}
]
],
"2d.composite.globalAlpha.invalid.html": [
- "e5a3dd66960149b5c4842783c76a9403ca1b826b",
+ "db67f882f66ffe7fc7519935e52734e2cd928182",
[
null,
{}
]
],
"2d.composite.globalAlpha.range.html": [
- "ab04186401061dce9370bdaf974e56a5b56c2fd7",
+ "883b0cac69a77a4707e88784f20656acd5a7c13b",
[
null,
{}
@@ -581076,63 +582311,63 @@
]
],
"2d.composite.operation.casesensitive.html": [
- "96e7d597a76c93050b110a47f32db2184e1cbcfc",
+ "13ae99b35f945df2afecf4fafecac6443e76ff61",
[
null,
{}
]
],
"2d.composite.operation.clear.html": [
- "99d8e1d92f812ae1887ff9d9038b1e7b88a52669",
+ "c1e88b4894e837bf4fd4928343634cf2aa03164d",
[
null,
{}
]
],
"2d.composite.operation.darker.html": [
- "4bf5878d9bb478151182eda8f19a6839b0d647fe",
+ "4fb6998f71dbc8f8189a43e67f18bc5dd9d7bca2",
[
null,
{}
]
],
"2d.composite.operation.default.html": [
- "ff0ab69cc416e55f593ec97fb9906f66cdaea98a",
+ "5ccd488b3c7a0b05f590141b21e4fcd3083b66a6",
[
null,
{}
]
],
"2d.composite.operation.get.html": [
- "4831ae773044a0a68f14d708b6a42d4c4e2b8b12",
+ "27b89c9fedff8b24956c09f713f862dd1bec4291",
[
null,
{}
]
],
"2d.composite.operation.highlight.html": [
- "88fe7ff37a6d0acb688559f7a3d70bd82186f302",
+ "45c5dd15ebbe262411b6da01b187685aa15eb79d",
[
null,
{}
]
],
"2d.composite.operation.nullsuffix.html": [
- "7998d7253328ddddcb2b87133bcf0bd60d6a542a",
+ "8a2443ff41d6cddcc57f6418f83e0ed6bc739938",
[
null,
{}
]
],
"2d.composite.operation.over.html": [
- "bc286190fb1848d756e9398620872da46ab3072a",
+ "1d742ef3cc4b5d1664e77bf1154bf4c84d603c5e",
[
null,
{}
]
],
"2d.composite.operation.unrecognised.html": [
- "90f098a68538a6021223bb875b6afde0e38f757d",
+ "e4aa877d96fe6c815e4eb70f20ced4eca8716099",
[
null,
{}
@@ -581449,28 +582684,28 @@
},
"conformance-requirements": {
"2d.conformance.requirements.basics.html": [
- "fed4aa61ba922171c3bd61a071b73ef2442c327d",
+ "cea531f9dbb4adf1f258ee938b101311c2b13259",
[
null,
{}
]
],
"2d.conformance.requirements.delete.html": [
- "bfdf94319b4d94fa15823559fdc8f61a377562d4",
+ "a33cc869d6216d2f56411b2f88e5a791d93f1016",
[
null,
{}
]
],
"2d.conformance.requirements.drawings.html": [
- "40038b219102ce5e15d8c8cc109834575a4d4f98",
+ "efdad2eab9c476bcb3be9c12c84e5075ab73e9f3",
[
null,
{}
]
],
"2d.conformance.requirements.missingargs.html": [
- "2ac3d58f4e371d2159751a1f3062ee6f57605f34",
+ "6744c6c3814aaad65e44f70ae8029d3a64e862c6",
[
null,
{}
@@ -581479,266 +582714,266 @@
},
"drawing-images-to-the-canvas": {
"2d.drawImage.3arg.html": [
- "7669c280491a93d1b2ae2adca50c60cce41af18c",
+ "d9e2de563bf7f81e182b3c83e874463a5854ad31",
[
null,
{}
]
],
"2d.drawImage.5arg.html": [
- "3a2f205094612965813c49075625a4a4c1878704",
+ "befa7108f881de4f228bb1e3a25a05b340499af8",
[
null,
{}
]
],
"2d.drawImage.9arg.basic.html": [
- "80cda234bb886fd868c3cddf483659a5087e9064",
+ "f71eebc2e06ad4963c11345028a110e55495d9cf",
[
null,
{}
]
],
"2d.drawImage.9arg.destpos.html": [
- "d85ae7806569f6f3057889f5a64d9939c131939b",
+ "98da8eccbdffcbce088f9389e14c577979e67a0f",
[
null,
{}
]
],
"2d.drawImage.9arg.destsize.html": [
- "703c67889481e38310eb5db959a16baddc5892d3",
+ "f21096cd96012c12703977b4dbd3013e5e05ef62",
[
null,
{}
]
],
"2d.drawImage.9arg.sourcepos.html": [
- "b7487e09991b6794b6ccd1e9cdcf34dd4101cb84",
+ "ca4cc18948702c7391bbeaa9c1c1138a9ce86eb4",
[
null,
{}
]
],
"2d.drawImage.9arg.sourcesize.html": [
- "567b4abfcff06d5a37aed6ae530c7f58673db829",
+ "fb38943cfa7cae12f99387b03aa464f4bbe8234c",
[
null,
{}
]
],
"2d.drawImage.alpha.html": [
- "8926a72c9da80ca7f80661d346fd755912785403",
+ "52acd11803fa32405bfb97a2cb7860e429ee6fd8",
[
null,
{}
]
],
"2d.drawImage.animated.apng.html": [
- "b16473e36857c9b2013042f6609fd1e31b73e3c7",
+ "ffe19ce9bc4aec3fdc8073ca0ec65c2277f4dbde",
[
null,
{}
]
],
"2d.drawImage.animated.gif.html": [
- "30cad0c7aea9f2d93bb800431e98401f260dca66",
+ "6330d06ade35721f9e20b79a396715a4196392ce",
[
null,
{}
]
],
"2d.drawImage.animated.poster.html": [
- "779397f6b9b8bd5e3e9752e6db0bcea49107cafa",
+ "2d28bc12837973c78cf4c0b176698e1ed0056d7b",
[
null,
{}
]
],
"2d.drawImage.broken.html": [
- "7e9f145196369839e4d286d23f226ea1c4b7b847",
+ "f6516a8ecccf5834ca3b06eb9c7cae583fa190d8",
[
null,
{}
]
],
"2d.drawImage.canvas.html": [
- "3041d73791369c7d77b55a623b1a624ab094797e",
+ "d1f9aeb326f1cb4b8a3bd7ae1eb197606bbedfc2",
[
null,
{}
]
],
"2d.drawImage.clip.html": [
- "380620faf34c2badfcaacfb4d8e2e1725134c8f6",
+ "70ec029d8e7aabbda53871fd343539f79e349a32",
[
null,
{}
]
],
"2d.drawImage.composite.html": [
- "7b7deb0f91e2ab0f63263ec9e941b9a5b121fe09",
+ "4ff2026aad549d6516a0b19cccc5416fdd846553",
[
null,
{}
]
],
"2d.drawImage.floatsource.html": [
- "02e4626133d80d623c91fee7e95474bdf45c1039",
+ "3e100c257fed3fa8f2e218d394a9db6a113f3dd6",
[
null,
{}
]
],
"2d.drawImage.incomplete.emptysrc.html": [
- "c684589de06ba2f8dc3b982e5a1c59955577342b",
+ "849f41aaf663b6f1578b3be8da6f9ddbd713ef6f",
[
null,
{}
]
],
"2d.drawImage.incomplete.immediate.html": [
- "347e750eef99883f6abeb1f9de5a788137819b32",
+ "d2e8108d90d5143a78b31e4adb2808cde3252ffe",
[
null,
{}
]
],
"2d.drawImage.incomplete.nosrc.html": [
- "677a7b856fa5157d63f6773ca848a6e35c41fb18",
+ "dccf75c6d80e21f0b875447c19b66180087b0882",
[
null,
{}
]
],
"2d.drawImage.incomplete.reload.html": [
- "5f90f819efe9f9c5be18412ca63d31681dba61a3",
+ "b4a8440e460748333de5a3905105323135314ed0",
[
null,
{}
]
],
"2d.drawImage.incomplete.removedsrc.html": [
- "c887fd64533a0e7487f935da86a9eba9c892c46c",
+ "91e11eb15ce06aafe196cae14480d90e75f747ff",
[
null,
{}
]
],
"2d.drawImage.negativedest.html": [
- "1020754fa8f871ceaf878c2f2e5794668e31fd6b",
+ "94d4f71a7e9fbbb73c9535dcdd65880d3f8e0cff",
[
null,
{}
]
],
"2d.drawImage.negativedir.html": [
- "e02d0ff439d858660b8efa0483b31ba7f5360a8d",
+ "281da9a57349342d8701cac22e5f5709a69c86d5",
[
null,
{}
]
],
"2d.drawImage.negativesource.html": [
- "f15fc3adcb0f045a1bf968e9c29b851ab3ee4223",
+ "5a504973d11acad4f1dd9298e72ec8517a839cd1",
[
null,
{}
]
],
"2d.drawImage.nonexistent.html": [
- "a1d8badb069b7ee0a00c153b018926d158d3ba4d",
+ "0cebf6cf681bd2b8853a18f36fee55e193f3b46a",
[
null,
{}
]
],
"2d.drawImage.nonfinite.html": [
- "f1ad616355d4630777e2c6a762b30d4e2a45785d",
+ "8225d15fddc7499a95839d968a393f6bc68324fd",
[
null,
{}
]
],
"2d.drawImage.nowrap.html": [
- "3fde82454a878d3d365082640e85144f749ce6d1",
+ "8c32461b3ab23547fe24aaf1f8aa821fd546d954",
[
null,
{}
]
],
"2d.drawImage.null.html": [
- "73034f8ef0d8a4652c416e07afde119d035841c2",
+ "0f46c97dcea1bf61bd5e59970c232efdbe57543b",
[
null,
{}
]
],
"2d.drawImage.path.html": [
- "ebc7040fa4bcf415bc0593b0d33b57a8bcad9ff2",
+ "52852ec32e90b21f800c3401e2bb1eec034b5e7c",
[
null,
{}
]
],
"2d.drawImage.self.1.html": [
- "7c5524b95fdbe552e782ae57a6491fb590aa43c8",
+ "90eaaea5d96d4d01a02d0de89a197ea8d2ff1a13",
[
null,
{}
]
],
"2d.drawImage.self.2.html": [
- "dbc96dbb3c17a5a5a56937f6be0b975fdb6992b0",
+ "39e619ddc5b17738b978e9b8506c9193acef6fd2",
[
null,
{}
]
],
"2d.drawImage.svg.html": [
- "5464e63e2301ced5d2323d996fec05d597cea420",
+ "bcfcdadb28d8fbd3774c485769179e44448d461b",
[
null,
{}
]
],
"2d.drawImage.transform.html": [
- "2c8f930262bdfba0c37b7113551030c479ff4983",
+ "42a277e20086363c7fc6cb5fdbb60df6f54b8514",
[
null,
{}
]
],
"2d.drawImage.wrongtype.html": [
- "90b3eac69740d44ed9b859d15fdb186d43bd11f3",
+ "73e8f45090c9da2441e27954c30d99dffafcc8fe",
[
null,
{}
]
],
"2d.drawImage.wrongtype.paragraph.html": [
- "1acfa22d599467fa12e6d71249d4c7c7a843e892",
+ "ef0be39ca740b568192c75bb76dc1cc06f8c07a1",
[
null,
{}
]
],
"2d.drawImage.zerocanvas.html": [
- "5906d61c3c1b19b5d2a5d28dce316ee665e79e2a",
+ "d3c644cf88b921b46e34d206a5728a96b05d43d7",
[
null,
{}
]
],
"2d.drawImage.zerosource.html": [
- "c3ce69d9e0b148bc7ebf3222c95335a034ff233d",
+ "2b7b4ebea6df5dc01ea7f92441c0e2eb3cdd7e11",
[
null,
{}
]
],
"2d.drawImage.zerosource.image.html": [
- "403df3db463c2297be366d9cfd9aec5bce3b0c1c",
+ "ea00f1f9a14d1549b210d2e89cd0fa0751ec0557",
[
null,
{}
@@ -581747,224 +582982,224 @@
},
"drawing-rectangles-to-the-canvas": {
"2d.clearRect.basic.html": [
- "3821fff21c0c2472b03831184862114bfacd3f43",
+ "78a8c3ac064b2ba02c08c9ab4ff7ced131895439",
[
null,
{}
]
],
"2d.clearRect.clip.html": [
- "da2642394416fb93c14b3a0fe052aa132d09de98",
+ "eb43a401e7824c7aebc03290fbbbe17f88fa31e8",
[
null,
{}
]
],
"2d.clearRect.globalalpha.html": [
- "3a228ae7ab3f9e3cd2562555d161dd80e0ad8e32",
+ "73b87ecc81d8eb40456f6ae7d8f0ae076c580709",
[
null,
{}
]
],
"2d.clearRect.globalcomposite.html": [
- "2f49b8086004d03418bd73124e1ffb6371ef49a8",
+ "9eb3d338348feff307e8f2448ca604a8bd02495c",
[
null,
{}
]
],
"2d.clearRect.negative.html": [
- "13ad1fb81204e6eb4680cb2dcaefe86e34158c5a",
+ "baa48e2ba3635bfe5567e20310b73282699c6bdc",
[
null,
{}
]
],
"2d.clearRect.nonfinite.html": [
- "56232594e10accfdd37ed73745f500b8d9ec10fc",
+ "726ed057727552d445563424eed4e4c3b0d2b3df",
[
null,
{}
]
],
"2d.clearRect.path.html": [
- "8d837adc3a3df4e233018ace8e6578aaf2a2d84c",
+ "77c9c037b73a86cebe220751bd69aee583d432f9",
[
null,
{}
]
],
"2d.clearRect.shadow.html": [
- "e65b46b23cd3d62733c92a995335b4d19c5bea63",
+ "8240073a281e445fea1041fb63fe0654da544674",
[
null,
{}
]
],
"2d.clearRect.transform.html": [
- "9e524c36f2122296e98fe1033fb5d7a141478ed6",
+ "347bedb83557298291ef5519a1edbad18261d1da",
[
null,
{}
]
],
"2d.clearRect.zero.html": [
- "ea1fff31cb86a1c074de52a515c3f418dc2ce3a6",
+ "2c192a7102b5dcdb15afde4adace7e54f95a61e2",
[
null,
{}
]
],
"2d.fillRect.basic.html": [
- "14c04829a7501ea39679e78ca321787a3028c868",
+ "f29daf426a21ca2b40d15eab6c7c9202a38643ab",
[
null,
{}
]
],
"2d.fillRect.clip.html": [
- "bdd269e1ad0c3f09323acc4d04e184a6ea5c977e",
+ "cc46b765d4f16c583b4b6c88c70c7837b8ba54b2",
[
null,
{}
]
],
"2d.fillRect.negative.html": [
- "6f754581b22bb02440e33ed8f7b65f936e9b1e26",
+ "7c64952e8bf55b850be4b2e15280918824677491",
[
null,
{}
]
],
"2d.fillRect.nonfinite.html": [
- "bf0ea501a07eaaf24e778bfbb15ec8a6f1597489",
+ "090607766d919b4eee04d02d60bec09a6ba68890",
[
null,
{}
]
],
"2d.fillRect.path.html": [
- "3d073c41f60f71c121d05d67125ee973bcf2ddf5",
+ "39a6e181033a296d0bb7c8fe62d91dc16296e447",
[
null,
{}
]
],
"2d.fillRect.shadow.html": [
- "78f3f4d36771b49540799eb59475baf4b383732c",
+ "48aa8538f1d1a2e3e0ddca4c534b79821918e717",
[
null,
{}
]
],
"2d.fillRect.transform.html": [
- "6892747651e4d56d7fad4530fb7f25d85b8d638c",
+ "de6f790bc77cafe62b8630131c6e730a9f595044",
[
null,
{}
]
],
"2d.fillRect.zero.html": [
- "915347713fa3443c5a38b33db58cf7e92b232529",
+ "095eb19a667f6c2dfae8303eeee549ef60579ec0",
[
null,
{}
]
],
"2d.strokeRect.basic.html": [
- "299bb8a39eeceb9890b464f99e9eec587c77e255",
+ "d2ea8131789061a6a9d76a179cd4cb525328f610",
[
null,
{}
]
],
"2d.strokeRect.clip.html": [
- "5f35cd07be33ac91c12b60ac60ab1c1d1a90088a",
+ "31db69b6cdc49845a6e9bc3b2218bbb08912b542",
[
null,
{}
]
],
"2d.strokeRect.globalalpha.html": [
- "3e80a77f74441a8197b9e570962fa3f2366b39ff",
+ "323b663145eaa7511c0267804194d7b82abcb823",
[
null,
{}
]
],
"2d.strokeRect.globalcomposite.html": [
- "ce52dffd8c215f8d6b2eba34323faf09d903f7cd",
+ "671db7f07a82c5ede6da46dc5a48c57c34f26678",
[
null,
{}
]
],
"2d.strokeRect.negative.html": [
- "617d56f125cd6baf72413e314eef9bb5c6b99174",
+ "20bbc5bafeab443443697661f56726059afc5bb7",
[
null,
{}
]
],
"2d.strokeRect.nonfinite.html": [
- "3f98e5e2feb4665c2966e6c0c7891c2674057713",
+ "af7a393c8fca8e957d3566e3d6ffedbc44b3a102",
[
null,
{}
]
],
"2d.strokeRect.path.html": [
- "5d88373525a7f4285f071ba538c5b93003acd9b6",
+ "121789d8642784a844b6d8b00b36eb2f0f9bc469",
[
null,
{}
]
],
"2d.strokeRect.shadow.html": [
- "a8c7ba314a31e5807b38fe1e8a2d347b2b1c363e",
+ "8e7a50a7458e539e1aa0a3d82c9dc6b2bd5bc0a7",
[
null,
{}
]
],
"2d.strokeRect.transform.html": [
- "9fe89042abf02b780f9765589ffd33e7fe32e234",
+ "312b9d200387b70610eb01a5cbbe4e49b51fead8",
[
null,
{}
]
],
"2d.strokeRect.zero.1.html": [
- "188699d6a8d11b1efc846b54b026853ccec0e2f9",
+ "c140a2668b0c454b0e74ed84910aa90ef3f42e13",
[
null,
{}
]
],
"2d.strokeRect.zero.2.html": [
- "2e28b90dd2a50c487fdb28fd7c14b27b09b1e09e",
+ "f17620a30249d431b5470cccb7665c2cbea83e85",
[
null,
{}
]
],
"2d.strokeRect.zero.3.html": [
- "5831c228fffc352256be3235d768dc08e60787a3",
+ "e671ae4116ba57dbbb37db9c4a32f5332fd6f433",
[
null,
{}
]
],
"2d.strokeRect.zero.4.html": [
- "6a09e8eaf9586fa24b42dec40fd396a6d2c78622",
+ "ff3c4040b3f0334636440daadd66539da8d16e13",
[
null,
{}
]
],
"2d.strokeRect.zero.5.html": [
- "c6cc50ca9b5deec39cc6b0148c4e901391941026",
+ "809781ab438ac5b116c4b0f66b6418b37e443bab",
[
null,
{}
@@ -582283,14 +583518,14 @@
]
],
"2d.fillStyle.colorObject.html": [
- "02408138c24178cee210192711e97a3a894ecdcc",
+ "ae6507350cdc75f04a3c2ea2311dac9c09ee77bd",
[
null,
{}
]
],
"2d.fillStyle.colorObject.transparency.html": [
- "09a8eacdeca918f3699376eb9553d514f03415e0",
+ "b48715f093d9d01f714dbe50f1aaa6c7aedb9c3c",
[
null,
{}
@@ -583998,14 +585233,14 @@
]
],
"2d.strokeStyle.colorObject.html": [
- "a56a020abdaa4136ef01d4c8b0e3fe5f638a1dfb",
+ "308e6b54b782620b28a2bfda98367f54f62b19b9",
[
null,
{}
]
],
"2d.strokeStyle.colorObject.transparency.html": [
- "1b19cab317a3f8c7c53c8e7b8392f38f043401b2",
+ "0232140eafda318ea23b61352bf923575f3fad0a",
[
null,
{}
@@ -584021,84 +585256,84 @@
},
"filters": {
"2d.filter.canvasFilterObject.blur.exceptions.tentative.html": [
- "77818444c87c90312000dc6a601eb5985be1f070",
+ "2abd7cdee756ce44c04fa06ac1566c01e01f7ff4",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.colorMatrix.tentative.html": [
- "a56840e60739638fbf54e1363d119fab56dca3e3",
+ "61c0f37591ea8ca8e0873d5ba2728f0157f16941",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html": [
- "c54299ff2a5a45f66bf67ff31d1945c201ed4f82",
+ "0512cac1c9816c7172fe825655457c09467bbd54",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html": [
- "110cd2396ea893dd9586098e9810399f63a179f2",
+ "c6feb50a35d46f327d7ec1358ef5f6257b319498",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html": [
- "96a3e4936ee2640f792b971ff4b9f702e7e3b79f",
+ "bb7dc41c3d87d939c0540495a99670198d1879e7",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html": [
- "10f9931cc6430ef84b2314add5581c09136122b7",
+ "ee4a053961728475ae34ae2c9d73eb7882cb7710",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.table.tentative.html": [
- "7e743bf34f008d0b4579183d8f28ad2aa0624a81",
+ "510d1304246059498d02eccc5ab6b7f0b01e9a0e",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html": [
- "b994a91842c031f05cd1650ee8078a62a0825416",
+ "4f4a9c17bd182eab31eaa6df8fa7b2e20a42c45a",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html": [
- "71a8c9eb4843c3f1f8db1df27a6e372bfbd7240d",
+ "2a14e30bb75f1de38c3b47351f5cc8802f98cc74",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.tentative.html": [
- "a4625db01977fe277d3b0543dd80146b7ce47f55",
+ "059a71025d5f1342b9c77fb2f9f48fb4f349be32",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html": [
- "64f909a7fdb25ee209ba4aeb6fd3830b5b6a7e48",
+ "7ab62e368d0cd1135df835e21b8b15d64ef0c146",
[
null,
{}
]
],
"2d.filter.value.html": [
- "b5803655f5c6e27357996c2ca6243e1c9fb6a882",
+ "5716b9bd167bb1d3900810b8281366f5d3c03806",
[
null,
{}
@@ -584107,224 +585342,224 @@
},
"line-styles": {
"2d.line.cap.butt.html": [
- "59b1f76c686c2eba0be332f446b70fad1d22dbeb",
+ "f8c7cab1f2ecd2b0020291ee836b1bd4019c2bc3",
[
null,
{}
]
],
"2d.line.cap.closed.html": [
- "5f16ac950058762a8e9da8521db191c56642eb29",
+ "263c6c6c76f6e02731583f7879122eb25d45864b",
[
null,
{}
]
],
"2d.line.cap.invalid.html": [
- "c62e71f6e290a7aa1cd6a290de44e94ec02d1bc0",
+ "22e98ee3263f54d87c888e5afd9fea3ee873161c",
[
null,
{}
]
],
"2d.line.cap.open.html": [
- "fc5aca585c5f3ba34d7349b5840f3f66fd667778",
+ "6f7918a1c9fbf53f25a054644be43323e0cda9b9",
[
null,
{}
]
],
"2d.line.cap.round.html": [
- "48411812de05864bbc1e14989ede3971d1f339f9",
+ "3990ad384eadc1c415a5fb0c3e1cfe0ab88a5eba",
[
null,
{}
]
],
"2d.line.cap.square.html": [
- "3423fa79e473bb648d44a3c18462738224ba6af9",
+ "8d6af320fea83dbacaa21f600bc952b9fc189f5f",
[
null,
{}
]
],
"2d.line.cap.valid.html": [
- "2c02ede579b6037e2d51ad4f590391f1c8b7c22c",
+ "a11d32030eaf4a32f516aeb3d04bfdda1094fcba",
[
null,
{}
]
],
"2d.line.cross.html": [
- "a664e372534722f46986592463568a9252ad560f",
+ "e6866e3e40aa6ba41081d864839a666b7b9e9fa4",
[
null,
{}
]
],
"2d.line.defaults.html": [
- "efea3ca1aafdd414624a9767533754aa907d3691",
+ "daa4634387c394f22eb6e0f699d2478b69bb7e09",
[
null,
{}
]
],
"2d.line.invalid.strokestyle.html": [
- "29bd98e5e5249ffffdccd647f8171d75dfcdbac9",
+ "89a234ecc3831b641a81b2c65b89ece857a5c018",
[
null,
{}
]
],
"2d.line.join.bevel.html": [
- "c1320c2c0b364f96f68004f870d899102d6940d7",
+ "041e9a160586cdd5f815424554beced14a934373",
[
null,
{}
]
],
"2d.line.join.closed.html": [
- "6fd9d9d300badcd07c604d93f519f0f025770c50",
+ "a52219cccef7baa737d05a91da4f8569b3d5cd8f",
[
null,
{}
]
],
"2d.line.join.invalid.html": [
- "a1c5aa0dda86610c90fe7bbc0c7c6835aecd80fa",
+ "3c34ef347518912aa7f4a8b013dc757737af9089",
[
null,
{}
]
],
"2d.line.join.miter.html": [
- "b4f8fbc9a40e427c8d8f876cb46403e44b8bd5a0",
+ "5a3472e92d3761ed5900cb242f74bd4beea9e902",
[
null,
{}
]
],
"2d.line.join.open.html": [
- "162b1f87b294da6d8a01d414dcf3f6be71464dd2",
+ "55b7a8b49e81b62d582f73ad5e8f91662f93bca7",
[
null,
{}
]
],
"2d.line.join.parallel.html": [
- "c26182b0b47ab09686cccd12f065ac47871c3682",
+ "cd736b503d46790bd4e27814150fa06417b08bf9",
[
null,
{}
]
],
"2d.line.join.round.html": [
- "f1e60182f3cdad6b8d70a5579becb3fcd69548f3",
+ "fb968b9966774d7af0983b8440c34fcf127d1507",
[
null,
{}
]
],
"2d.line.join.valid.html": [
- "57179641f7d19592c3259d3e32a4e2d0445fd746",
+ "3e5e200cb58cd5124fc3ca16eabfd8d2dc268d4c",
[
null,
{}
]
],
"2d.line.miter.acute.html": [
- "7807d5942da915f6b979085e78d22459c351725c",
+ "6acba4f3d29959508d3fa72cb171ec264b964316",
[
null,
{}
]
],
"2d.line.miter.exceeded.html": [
- "9c31cdd4ff6a59bad5b206119eb94086c989a0a6",
+ "542851d580b0da011071d57d629259d6e4d10c9d",
[
null,
{}
]
],
"2d.line.miter.invalid.html": [
- "994956123c339a1ff5ad5ff9ffb364a475c23532",
+ "826a6e24a7e4e234a6924b862b76a18f5323f84b",
[
null,
{}
]
],
"2d.line.miter.lineedge.html": [
- "33d96f36cc813a81c0730a7788e88b602572a059",
+ "68eeb061627171fe67772a30457fb903b1b0c72d",
[
null,
{}
]
],
"2d.line.miter.obtuse.html": [
- "73507f623c223f5a3b011a77906243cc0661744b",
+ "2dd08f6afc0c9ea5df6e4d36b7dcb2d01c1d1218",
[
null,
{}
]
],
"2d.line.miter.rightangle.html": [
- "a8b528bf056ea88f05490cf7844fa0f05b0720a1",
+ "7ae9f5e232a33434aba06b716cd8b41c428984ae",
[
null,
{}
]
],
"2d.line.miter.valid.html": [
- "a96c1cd1843de44796a9969bca57af55c57449bc",
+ "51b00c292d812721a2c8538e0bad115052b5e005",
[
null,
{}
]
],
"2d.line.miter.within.html": [
- "c5d71cda57449925aec39682903692eed1c0c222",
+ "f43886600943722a4f9f40c2cbbaa078835e5f72",
[
null,
{}
]
],
"2d.line.union.html": [
- "e9f5a85e02a33c40c4d1a6525123afcda6d93541",
+ "9d43cebee7d5d9b39c789ec946d303c0f07f56d9",
[
null,
{}
]
],
"2d.line.width.basic.html": [
- "b0fe6c466502daa5d028b4f59d2826b49d20135a",
+ "f2e9a9f86ddf706b8aa7deee2824ddecbc24b1ff",
[
null,
{}
]
],
"2d.line.width.invalid.html": [
- "a5a1a6d8d7e64618b3e46abe3523e672a589e871",
+ "363060cf6d2fe1c0ee86eeb5ab9c34465af319ec",
[
null,
{}
]
],
"2d.line.width.scaledefault.html": [
- "9c50a0d68e1d75e4d91c0ad60f59a658fed1c4df",
+ "6c4ec52b5d298de284646a2197f4afe4a6f74fa4",
[
null,
{}
]
],
"2d.line.width.transformed.html": [
- "f42f859a31ee1ce18c173fdceee68ef6d0a4c7b3",
+ "600ce93fb743f036ef1658be23da19c3e38c3c4c",
[
null,
{}
]
],
"2d.line.width.valid.html": [
- "9078809d65b64821d77ed5140722296e342187b9",
+ "1a76b0ed4cf33e9f4bb89aba85e987f84a8b1b77",
[
null,
{}
@@ -584383,6 +585618,13 @@
null,
{}
]
+ ],
+ "drawimage_zerosize-image.html": [
+ "1c4e74866ab2825c57fc16ad419e2ad59e80067c",
+ [
+ null,
+ {}
+ ]
]
},
"drawing-paths-to-the-canvas": {
@@ -584741,1176 +585983,1176 @@
},
"path-objects": {
"2d.path.arc.angle.1.html": [
- "838492d182a845512df72cd61c83d6bdbe9f4446",
+ "85ebff4c0ab150b4530365ba022c65481cb4bd4a",
[
null,
{}
]
],
"2d.path.arc.angle.2.html": [
- "7ddcbcbe47749ca253a9aa8a3e1eb271555ee115",
+ "7eefabd993c6f822fc9813aa8703b184998c51ef",
[
null,
{}
]
],
"2d.path.arc.angle.3.html": [
- "f5df8a2bf2cf7d9238b60cf32c2aa5e76ba335eb",
+ "899c50dc90439ff05c24415528e8b1578e57ffd3",
[
null,
{}
]
],
"2d.path.arc.angle.4.html": [
- "635112f76bc8d1ff468bab4a3ad426531672e4c9",
+ "3f1bd84d69805e0a60e9c2c9e50c4357b405dba5",
[
null,
{}
]
],
"2d.path.arc.angle.5.html": [
- "59edd27bbeff7929ce8c60f8db64082590a6def9",
+ "2373bd4f0a635a47c1e2f28ae89166b7052744d1",
[
null,
{}
]
],
"2d.path.arc.angle.6.html": [
- "83f960b60e2481d5b8db3e71c8550342bfe8c31a",
+ "b0b03cff79faaf8a881605ee629493663f1a60f9",
[
null,
{}
]
],
"2d.path.arc.default.html": [
- "51c1f1a8f809d2bd805bb6fa5cab53ce347dd803",
+ "b52941fe3f241e65b997961651eafe8b323f9483",
[
null,
{}
]
],
"2d.path.arc.empty.html": [
- "bff802900152098db1802ddbb729840f58868525",
+ "295ee4bbb29c831119d12cb3b6bf0eff3ad05524",
[
null,
{}
]
],
"2d.path.arc.end.html": [
- "aa26b65921874efe96806af26b1aa82d73855dae",
+ "a581a40e8e9fde25929e773eb2218535083a4ddf",
[
null,
{}
]
],
"2d.path.arc.negative.html": [
- "9d1f4d8919383d062e5578b810a9cafe713807bf",
+ "fd81ebadcd7b9bb1ce3b87c1ce1bfe8f13dde34f",
[
null,
{}
]
],
"2d.path.arc.nonempty.html": [
- "63a472ba9af24ffe24919f16628cb3dfce6556cf",
+ "982829013d7f0d1d5ce7bcc3ebaa528a814b71cd",
[
null,
{}
]
],
"2d.path.arc.nonfinite.html": [
- "04d51bffc0fb1386782bbe853ab922f29d4cc61a",
+ "a1b15e7a88ee10175f5eaaed227f1ab7403ae8b2",
[
null,
{}
]
],
"2d.path.arc.scale.1.html": [
- "c100c6476fa878ec3e7ae31cd1b0f783a6bcb07c",
+ "951c9ae26c3eef15d664ccd00b00b779d8b31f7e",
[
null,
{}
]
],
"2d.path.arc.scale.2.html": [
- "1045e4027693df6a18ded63ca5835579ae0b5516",
+ "6b39e162222bf8609bf53748b0541483ee364d73",
[
null,
{}
]
],
"2d.path.arc.selfintersect.1.html": [
- "c97c833ec1aea76c75fce66a40c81457918b2497",
+ "3bc81bd77a78426ab1214a82a8e2e9095bf0c79b",
[
null,
{}
]
],
"2d.path.arc.selfintersect.2.html": [
- "58c51e32ec852a8146c8c588275b793da539b0b1",
+ "e3b14a782f690c59d024a2e0b51c093d92af9313",
[
null,
{}
]
],
"2d.path.arc.shape.1.html": [
- "29bf2cf6532a30a917a67715190f61fa3b9932ea",
+ "8a456841ad6f10bc08397a6a4697822fe0894915",
[
null,
{}
]
],
"2d.path.arc.shape.2.html": [
- "aad3a51964566cc0a9400e069543383af772ee40",
+ "f820eed761e22b0c0a302cbba7db53d05b2591ed",
[
null,
{}
]
],
"2d.path.arc.shape.3.html": [
- "8f9e2735828cbf696205c5bf82cbba3083b340f7",
+ "aa08d441944be3ee3fe1ed5f70f4f1895c5af112",
[
null,
{}
]
],
"2d.path.arc.shape.4.html": [
- "4efa26369f9f1d234e02538def426085db10dbbf",
+ "b00d4468f2baee7d5170843e174b2faf67892238",
[
null,
{}
]
],
"2d.path.arc.shape.5.html": [
- "21727d4f4992b63a4b9056669e1e6cd26fca9619",
+ "f5574d2773e2a263a5a9ada2aeb0f0aba5e6acdb",
[
null,
{}
]
],
"2d.path.arc.twopie.1.html": [
- "a07eb101bd8d29694e56bff9788b318e56c7aeda",
+ "6312efb3e89bb3ef19f90d9930c97a93627da53e",
[
null,
{}
]
],
"2d.path.arc.twopie.2.html": [
- "5ea0c1e60f044fefd859a1c5002093ba3ca52895",
+ "132c2d38ddf39976c3bd7f4c63a7c4ea5e20eede",
[
null,
{}
]
],
"2d.path.arc.twopie.3.html": [
- "8e1d50e002f7a343e04a642b7ccbc852bf40902c",
+ "204ed54a1ec2f13e86cf9f12f5445c0143358e12",
[
null,
{}
]
],
"2d.path.arc.twopie.4.html": [
- "914fc4b18d8e8d8468ba39d79fc0338cef0b2c91",
+ "d5535a794977ea7056becc1648399cf0e4a5b7ff",
[
null,
{}
]
],
"2d.path.arc.zero.1.html": [
- "b648c869adc275af00d0dc8cdbcf07993d7ce603",
+ "2c93425b1e106ac468fa15d5d0aecda034f32588",
[
null,
{}
]
],
"2d.path.arc.zero.2.html": [
- "4aab17a7a5a0a9b48af2113462f66555fe914818",
+ "c290c2f32f63c8e6737a50f558ccf868b2d74097",
[
null,
{}
]
],
"2d.path.arc.zeroradius.html": [
- "6f50bb474f9cfe2c84e2b9597ab49eac29629451",
+ "f75403b2f3459da5b98769ae204f19f975c27d97",
[
null,
{}
]
],
"2d.path.arcTo.coincide.1.html": [
- "9b963505ee2d0e22241b214be27b16e658ad0cd2",
+ "01c8091c463e62dddfc7d78bc89403be3a19778f",
[
null,
{}
]
],
"2d.path.arcTo.coincide.2.html": [
- "4cabedd056a545dc86aca5678c2c0613a5dd3b17",
+ "d216949aae91098943802f5c5a783ddc7720ae9a",
[
null,
{}
]
],
"2d.path.arcTo.collinear.1.html": [
- "393c7a7f67354acc225f5fe57a648da913edc1fb",
+ "e91e2e4b1b46f2e09700dfed277c454566b5f8ce",
[
null,
{}
]
],
"2d.path.arcTo.collinear.2.html": [
- "7dc386b518397761384e9f6640a9427c35e0eef2",
+ "97b1339295cb478c22a19de26d54f7b966b61a4f",
[
null,
{}
]
],
"2d.path.arcTo.collinear.3.html": [
- "76930e5fd1235e88d62a4356475a3fa7945c55c7",
+ "2f4394f038dc802785b833815fe5229c69b10396",
[
null,
{}
]
],
"2d.path.arcTo.ensuresubpath.1.html": [
- "756cfe602c7ab9709ec083683a2aed23111d7a9c",
+ "2781bcbba375020c8adcc5babc32807a4cb0ec77",
[
null,
{}
]
],
"2d.path.arcTo.ensuresubpath.2.html": [
- "18b1992d89db2e7672e17ee874c958f89deabc4d",
+ "f5da07c1c6ac5102b6fe666903d97fecd8ba5191",
[
null,
{}
]
],
"2d.path.arcTo.negative.html": [
- "78f4fcebf7b37b844d86fbab832fe81eb6bf2877",
+ "0091ca2a6713d332476d5e881e399dddea74f0ce",
[
null,
{}
]
],
"2d.path.arcTo.nonfinite.html": [
- "d05e05d278147b4a40aa35f9a7530c9846fb89ce",
+ "0d7be1d360867cb28ed9d91129b32ae596cf9885",
[
null,
{}
]
],
"2d.path.arcTo.scale.html": [
- "00d9f99b96a3731768dfbd365c802a85f7ee75ad",
+ "6645f0526035374d1a4b2c9be50f9a5310e65d37",
[
null,
{}
]
],
"2d.path.arcTo.shape.curve1.html": [
- "0caf25048d345fdc3257eadeca7ae16574478062",
+ "4617b2cbbb6f7aac0cf23a3fc20f0f91942ef7b6",
[
null,
{}
]
],
"2d.path.arcTo.shape.curve2.html": [
- "3e1677bec01ece8796be72c7ba9ce3159823f1cc",
+ "bcc4326eea2de40db4e679fee49739e04b17ec16",
[
null,
{}
]
],
"2d.path.arcTo.shape.end.html": [
- "8a41dcd7b61c09af7c5730afb0f06939f8d7bf98",
+ "829c70f5f4705a70718c383acebca0d8f95d0fc5",
[
null,
{}
]
],
"2d.path.arcTo.shape.start.html": [
- "1ee229ef327cb95c2cc8dea772ee0fe98518a746",
+ "0abeedf433d66064f7067008775785d4702c001d",
[
null,
{}
]
],
"2d.path.arcTo.transformation.html": [
- "32811f2300530ddd032dd0c25e6703e0c143fea4",
+ "5aa8562b1df3ddae0d549246810213a2a736efee",
[
null,
{}
]
],
"2d.path.arcTo.zero.1.html": [
- "4bacbf0dbce7237695844eee3e51584775b4e804",
+ "bb2cc1d3e36739995260a2d2d26b9e60cf7f9105",
[
null,
{}
]
],
"2d.path.arcTo.zero.2.html": [
- "1f26b5942b2fbde6a4f12970a6bd38711f2599fd",
+ "d2eeee535d223dda4912c677c5be3a98bf93eee0",
[
null,
{}
]
],
"2d.path.beginPath.html": [
- "a21282cc3e55d376cff1f653467af553a532018f",
+ "316f6af94282c9ed3d56f6ee5cfd57b1ced5bc7f",
[
null,
{}
]
],
"2d.path.bezierCurveTo.basic.html": [
- "7f90f7bde4698ad415fe32d51ab82a58c4950ebc",
+ "0c3d7f948b9367b3d9afe0443a80de869e563bc7",
[
null,
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.1.html": [
- "1e6f8298c5ac2d7c4974bd02c4e06c6fb8e0e127",
+ "ebcce3f48cffe177bb77ea0841910f599876efcc",
[
null,
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.2.html": [
- "875601c5dabd8bc04ffeaaf357cc6e89f38ea7ae",
+ "c269b72d333c0e505024a7d1f3f3b92640d8fa65",
[
null,
{}
]
],
"2d.path.bezierCurveTo.nonfinite.html": [
- "e6da7b2726736d733abf2c65353056865a3a79f5",
+ "6278a67283099011b5ef99484b1cc827be288efb",
[
null,
{}
]
],
"2d.path.bezierCurveTo.scaled.html": [
- "d24b83786fc350dc01d428c12f0e3f714aa0e8eb",
+ "e7a5d8b524cfcee672e59272c361316f78564240",
[
null,
{}
]
],
"2d.path.bezierCurveTo.shape.html": [
- "7ebe1e3460c64f8bc9d51345490fc098270d614d",
+ "cbc28244252ec7ccecb0a94e8332f79139012a02",
[
null,
{}
]
],
"2d.path.clip.basic.1.html": [
- "c49afd431ff7cd5902985ed51e7e612925c36b45",
+ "a5515e4f7ee502c4d2862ba57cecc7010e596e5e",
[
null,
{}
]
],
"2d.path.clip.basic.2.html": [
- "dfba3b8164a2adcca837d2b317c8bc8ed44c8dde",
+ "27e1ad0b0cfeec1c7e18eeae5d19824b57c699cb",
[
null,
{}
]
],
"2d.path.clip.empty.html": [
- "ba7a869f5cdc858e6ca5d96dd16ec8271096f751",
+ "17208ad797ef99c79ef942767b214627a0884d18",
[
null,
{}
]
],
"2d.path.clip.intersect.html": [
- "1cdd9603d79eef2d1c18a298095655f1ab98f622",
+ "c1057f264570a822f3d841738b27dca5688954ae",
[
null,
{}
]
],
"2d.path.clip.unaffected.html": [
- "893877f876d2f4efdc5ec40b6c02cbc0dd68f906",
+ "66f0379602148e807034f2431d93db80c423423c",
[
null,
{}
]
],
"2d.path.clip.winding.1.html": [
- "5e8fa814243901a67cde7889c4e50ae03b49834e",
+ "46e4db9b6c9adfcac81f0ccc5c07dcca83265680",
[
null,
{}
]
],
"2d.path.clip.winding.2.html": [
- "ae8fd4c4d94576e3e5c5e3a9cfb3a903d7072e57",
+ "9341353a8d16e552431cd16a117eabf9a9e7161d",
[
null,
{}
]
],
"2d.path.closePath.empty.html": [
- "e9840f195a3e78430abce062b73ee4b3497f35e0",
+ "898cdc5fa6d5092f449785505fc2a9979f8d4a36",
[
null,
{}
]
],
"2d.path.closePath.newline.html": [
- "2ad2609e1aec28c1e8855f7f66c936c1b1140eb3",
+ "07ec4b2a829fe8d4b553cf62fcb6ff94dbb9205d",
[
null,
{}
]
],
"2d.path.closePath.nextpoint.html": [
- "7538af29f3033658274fb16472c150d0bb98c1af",
+ "648d7ad37af8a68185982924fb530706066812bb",
[
null,
{}
]
],
"2d.path.ellipse.basics.html": [
- "13ba8be5b6e48f153ffb8202453c25b6bcd60cb2",
+ "d46dc31d261d4567f8f95db91dd0cd5891764ce3",
[
null,
{}
]
],
"2d.path.fill.closed.basic.html": [
- "890c15cf4b29310c019f07e4e97049950e842a25",
+ "010dbf43e1a5e18da21cc776d1cc83a4de4cc6f9",
[
null,
{}
]
],
"2d.path.fill.closed.unaffected.html": [
- "bd42e95181f743e5ee17779acb301fb9c5fafd62",
+ "e00a6c8f5509aa7e694a9970f117feab62bdef5a",
[
null,
{}
]
],
"2d.path.fill.overlap.html": [
- "eb50ac6846bfee3394ea2de2b239c327360b27d6",
+ "08782ed11ee893ba2d449224cb60e390967aa981",
[
null,
{}
]
],
"2d.path.fill.winding.add.html": [
- "5fbcd65260170528099fa6aed30cafb39e0837c7",
+ "ef9a2a0f939d247d9f4df7cc22cb65a7b7c20be5",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.1.html": [
- "963e5d3c75d5cb627dc7477bf235e5a95e3d9e54",
+ "eecf0198e27d4e126426b04df0d88bc07ebb560e",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.2.html": [
- "305d628b9e56b2f188e7f2602e17f855b9edd8bb",
+ "cf8b6a6ce984e4cfe5172cb8b027c08da073e977",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.3.html": [
- "4bda1bd248f32c3c5f3d7ee0cb4949a7647240ca",
+ "e056e330039ce8047d103f4ac473704c2baee85a",
[
null,
{}
]
],
"2d.path.initial.html": [
- "ec17cc330aa55db43ae7982239ed5ede8c611023",
+ "a3de93a7999e8c93bc1bad4a1e931c4d791b9eaf",
[
null,
{}
]
],
"2d.path.isPointInPath.arc.html": [
- "ecf184227d0935fce4f2a63146fe7bcb6521bcab",
+ "bc4bc560e5652e104db8a33c24b47c063ef974df",
[
null,
{}
]
],
"2d.path.isPointInPath.basic.1.html": [
- "09cdfd2c9e2b778dd1bc1519f0ceef105a57fb47",
+ "22562c60a2871ff8a84f69d6050ebe8aed515e94",
[
null,
{}
]
],
"2d.path.isPointInPath.basic.2.html": [
- "f2bd51a216f12cd7f842414e8e74af40d7d86893",
+ "9fc1060df8d42175dc32146625c62b30f63c43de",
[
null,
{}
]
],
"2d.path.isPointInPath.basic.html": [
- "fc30dfe4645f08c04ae774a72cbc30b4ab4bc773",
+ "5e3edfcc80955473215da4a3d7b7c3ba72ff945b",
[
null,
{}
]
],
"2d.path.isPointInPath.bezier.html": [
- "576c4f26e99978fcf99f15d07fc2ef057854a0dd",
+ "b2f2d23724a5bbb4dd4eead86047683b931f5724",
[
null,
{}
]
],
"2d.path.isPointInPath.bigarc.html": [
- "a9995208e4a88f1adbfa178be0fe2c5471c6a2b6",
+ "77cb495137d6b25778f143e04420c43bdb7a1a94",
[
null,
{}
]
],
"2d.path.isPointInPath.edge.html": [
- "01106f92a702b76aae5bbd0ba23bf91a122dbc93",
+ "b00da5a2a7117f0f971504f53e0cabdda9c83a10",
[
null,
{}
]
],
"2d.path.isPointInPath.empty.html": [
- "5ba237094b43425d2bdce58e494726b508e9f34d",
+ "3edfe01a2ae4bdd2717b7af46a201fd24cbbacfd",
[
null,
{}
]
],
"2d.path.isPointInPath.nonfinite.html": [
- "1523f4ca81d3e98e5ddc73d4bedc5fff387db32c",
+ "4ef541a4313752e0a47429091703d9fa384a0e05",
[
null,
{}
]
],
"2d.path.isPointInPath.outside.html": [
- "4f3b38f69569fd56e958dc0e632072382add4215",
+ "6431879eb66c66dd8f6f04bd614c64c123d6076b",
[
null,
{}
]
],
"2d.path.isPointInPath.subpath.html": [
- "92e25e249830f420e91954310134af3fc2606448",
+ "5d664557d8e8c8bb6f0174cf97c6164cbfceddbd",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.1.html": [
- "a210993ab98f422a9a1b231edb29ccd60ed96854",
+ "7268c3255ff5fcacf7154ccd7842e908322ca024",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.2.html": [
- "f74cdde1ef880c5d6decd5a32348f8b5de15c8a8",
+ "3adac7a419167efc687321c08f956aa3959e37d5",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.3.html": [
- "3469734dc94822034054a3d497c5d54f23ccb02f",
+ "8769c8a593b53393a8f7a92f3d90e56f97e3d370",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.4.html": [
- "94a2e15936634e0ecaa9c70ca679d3d9409c2544",
+ "1bcc0bc3a3f02a1a0d1a25da4440348f85321ab5",
[
null,
{}
]
],
"2d.path.isPointInPath.unclosed.html": [
- "41aa9c695b84908efb9c69561ecfaec5d74e6648",
+ "2e3b711129ef99c0aff9d57b048618186889b629",
[
null,
{}
]
],
"2d.path.isPointInPath.winding.html": [
- "82c78c7e378b4aa7bea4a437e385486de63674cf",
+ "ec2257079742c453d629479fabe466ea749ea935",
[
null,
{}
]
],
"2d.path.isPointInStroke.scaleddashes.html": [
- "1d1c9ba938df27599e10f947cbdc40f2aa444df1",
+ "e27baa154931ae3004323d6732556b57c6517a86",
[
null,
{}
]
],
"2d.path.isPointInpath.invalid.html": [
- "3bdd8f770c22170b2a10d6647e11498661bc304a",
+ "301c7c447d30cc2c1a0c44655dca09c9a297aa0d",
[
null,
{}
]
],
"2d.path.isPointInpath.multi.path.html": [
- "38949b89c835805beb2e6cb9fcfde75a80fb39d9",
+ "d71bd8a4c442999a2be6615e09bf64656f2ae831",
[
null,
{}
]
],
"2d.path.lineTo.basic.html": [
- "4a2cca3a3affa9922656b33a5cee7436a79de139",
+ "c6f2caa196836898b665557d412699fe3b4a9a13",
[
null,
{}
]
],
"2d.path.lineTo.ensuresubpath.1.html": [
- "0fa8f1c0549101dc57eef4e90aef3910806d80a0",
+ "ada8f0ca296d65aaf27238124534fe3bad7dda9f",
[
null,
{}
]
],
"2d.path.lineTo.ensuresubpath.2.html": [
- "e5b2aa335c24e057a05d5cf60352b2b9b4b9054c",
+ "ac1f9238ffd9007280d04a3ca795cc72c090f51a",
[
null,
{}
]
],
"2d.path.lineTo.nextpoint.html": [
- "54b586176de9f623e858f91ed1d3d0f7449d0879",
+ "f403c6b5088b2960c066c962a23783d7952cd21e",
[
null,
{}
]
],
"2d.path.lineTo.nonfinite.details.html": [
- "12643d65fd01daafd4c070159b5cfbe73df1bbb4",
+ "d7595db7d137372521c2d3fa12628f7595622581",
[
null,
{}
]
],
"2d.path.lineTo.nonfinite.html": [
- "fa3acf53851985da11df88e314a7642519c349c5",
+ "8246064ea3409a3b3f4b49f52f5ca298b7a24747",
[
null,
{}
]
],
"2d.path.moveTo.basic.html": [
- "3ab41dc039920345ab4639d057ed3b9005c76142",
+ "d08d67621eb96a5df9450eeb092704a10ca95f7f",
[
null,
{}
]
],
"2d.path.moveTo.multiple.html": [
- "24307b4e9ed56676cff8c7c014662a9f50d2b786",
+ "384d9fb437e827414822c6c65776d6cc1dad4490",
[
null,
{}
]
],
"2d.path.moveTo.newsubpath.html": [
- "456b7538ace7dec8e0b78c7c82eae394d2b486ac",
+ "2a3d69b63752c313274d9986665fa1c662f92396",
[
null,
{}
]
],
"2d.path.moveTo.nonfinite.html": [
- "4f61d9e58b9c59b0ce8930ede43169e7e72a5272",
+ "c6cd6f8178600ea9ceced955a1dfe9de0c48670e",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.basic.html": [
- "1c2da33f9673517f85422fc938846b3bbee2e632",
+ "ffbf039440f96527c35fd27d9f24dbb267683840",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.1.html": [
- "6c75732dacafabec8d81f2493db81d7d1ee01b5d",
+ "f8b8b515bab1b4fd5f19a923837e5d2085cb36ff",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.2.html": [
- "8da6964cc2fad05bc12572a37133633a51a45cd2",
+ "189c744c659c6f075a8b94cb5faa84c5994d4be3",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.nonfinite.html": [
- "4bc7107fca2718781ba4e30b911835c8d539ba69",
+ "1488e78a00ae990ee756025f6cca681aa5d195cf",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.scaled.html": [
- "4b6ffaa741b42809281a9e3e5b8dc918fe8979d6",
+ "90973a8f9771fb5f1bf74cca8e2fbaf5b5cf2c99",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.shape.html": [
- "58d35dc22f266696d65cd6816282fd7b6e9d3e70",
+ "23725c24210e785371b1d197907a12b9232de4a8",
[
null,
{}
]
],
"2d.path.rect.basic.html": [
- "296800decd521871d675dc5e9c3950b41df5c8b9",
+ "716cd29af70a2af44311f08ece16832f3dcc950b",
[
null,
{}
]
],
"2d.path.rect.closed.html": [
- "60a237770fa3ea7208ea122a845bd0ff66a6de04",
+ "385a88ab7ef57df4bade4f2d4ee0d42e5927ac53",
[
null,
{}
]
],
"2d.path.rect.end.1.html": [
- "6f3338b84114879325d5775e863f32541806468a",
+ "e1fd8052d8d85e1ce4cf91643af385f4843fa853",
[
null,
{}
]
],
"2d.path.rect.end.2.html": [
- "e5a1776dd64e13a8bdc30b017ac6786a3468eb31",
+ "d30bb111f1245491edbecf99639c47f1b78f45f3",
[
null,
{}
]
],
"2d.path.rect.negative.html": [
- "e7e51371e164ece9089eccf5d7e05c2723269e1e",
+ "b917137baea885bde1e59319c98aa56d369dfd01",
[
null,
{}
]
],
"2d.path.rect.newsubpath.html": [
- "e2c5a4cff83673f4c0ee908f05b308ea2abd8104",
+ "32b70ff2d8e142994e4b19292be91c1720f4c9d6",
[
null,
{}
]
],
"2d.path.rect.nonfinite.html": [
- "b8517e8fa4dca487159939f95a4bb321b322d85f",
+ "c0d245a49c8cfa6f96af91cf641f1ea90e5ab82c",
[
null,
{}
]
],
"2d.path.rect.selfintersect.html": [
- "e7c73dfaffbd449fec3708e7dfda7b8dcd8b56b3",
+ "8ebbf0c1f5bd090f51a874d68c43e37bdcd32ea3",
[
null,
{}
]
],
"2d.path.rect.winding.html": [
- "c9547fe32aae0b69152fa1124932d7a3ec99d335",
+ "d7350ef38c772d442aeb452ba8a75e3cae8d286b",
[
null,
{}
]
],
"2d.path.rect.zero.1.html": [
- "9a210e74414751d8e2605aaac7f8ca722dad4c0a",
+ "c773ef61d051a779f9b52892ac498d266027975c",
[
null,
{}
]
],
"2d.path.rect.zero.2.html": [
- "0e3a7c87d66d486127453599695f4d3e7ac1d3ea",
+ "5888231fc6dd75647759e7363631ed28fb65b8b5",
[
null,
{}
]
],
"2d.path.rect.zero.3.html": [
- "e92b121f312528300851fa10d8120b37cfc72c44",
+ "c000b008fb8d98d71a5ca58b5f1d96412730484b",
[
null,
{}
]
],
"2d.path.rect.zero.4.html": [
- "086ef94f29210ccf9109de8ec081b430ff5f7b96",
+ "bb3ecb3aa56b553b50784fd76837b63ad7cf2ee8",
[
null,
{}
]
],
"2d.path.rect.zero.5.html": [
- "880cab561409cfa3a70b800b2cfe0f1ff2009153",
+ "081c753d9198257494a4f719e5f69089bbe052bb",
[
null,
{}
]
],
"2d.path.rect.zero.6.html": [
- "34c9d15cfede26225a53676e3e15f8a3d000e7b8",
+ "dafb273d562a67f05b6cad39dbebfa6ff9dfc6dd",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.dompoint.html": [
- "bdcf60d44ccdd14410da530108535806a354b93f",
+ "3bb890ae969d9489663fee40db2b3162ff7f7a23",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.dompoint.single argument.html": [
- "6e13276c987d1e6cee90d64e3f0b686372666285",
+ "96e933870babaff3f080e04084a9220f58ffc495",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.dompointinit.html": [
- "6186d98eafa5db93fa1cda6ccfb7c13a9b8752e2",
+ "1315233d79b99b9a736ae3606d6fd30803b5896a",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.dompointinit.single.argument.html": [
- "7bf91ffe35c088849d954828d7d8bbc77f198abd",
+ "f5c6d00959124771b9dd0c1e3cc220d11643cc4f",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.double.html": [
- "250bf7d6ab545046864641e9a20e185af922de48",
+ "402631a7a00c551ee4cec9c4d77a5249a3d0caf9",
[
null,
{}
]
],
"2d.path.roundrect.1.radius.double.single.argument.html": [
- "e5e953de74bb9e1931988841c49789cb3d23ef8f",
+ "ed4887c2debc03d62a32dab39e368dbadb46035f",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.dompoint.html": [
- "699603b4fdb93dbd96d57c9206720e0c7321c6d2",
+ "00a9c1458244e0cc26a85d56e57fc6635eeb170d",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.dompointinit.html": [
- "55c06ca2ebb81c71a7fd459d0372e59a27525de1",
+ "e9b3a7bf79806fe20394cec75cd7a387e767cebd",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.double.html": [
- "1d38197baff9dc1efd99f1ac9f267265512d36ad",
+ "a2f02104e27b55ec38cda31005fb917649468bf0",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.dompoint.html": [
- "701109d4f2e61cef64625cad2acade509d359773",
+ "57df30d5ae06ef5c5819fbe5f111a7fb7c7bdd60",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.dompointinit.html": [
- "409d5014c3175a9247f444d9c576748d9d8428f1",
+ "5942ab750fe9b2ef8cb2c89e3ca6c39b873a240e",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.double.html": [
- "a0c458f006d80abcf5db3cd555d45f1af3429e1f",
+ "2390a61dfd8e9212eac9d92083508e257632d758",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.dompoint.html": [
- "ac4a3ddd89417a3f2941b113e937156cc36ad765",
+ "f4fa76afac3ba36d81cb31886de64529c68fd259",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.dompointinit.html": [
- "bdfba5df41986c45cf4a28589e8c7857c8dd0b60",
+ "4e7dc947f43547a773a53e7194e9fd316bc85184",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.double.html": [
- "3e8931e7fc00d07dc1017ca4ae6639cae6151aaf",
+ "d7888da6d9a13d937ce256afeb4c9fcd72ae5354",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.dompoint.html": [
- "7546120a6992f1adb5695f66cff981d0cab009ff",
+ "38a8baac53938363574553037c2fa17a84ebf81a",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.dompointinit.html": [
- "d8c805c28b6933371660a0a507e5a1c8339e2c16",
+ "5e867caf4281d879a4c1a2d6527692a6b8a7c8d3",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.double.html": [
- "c3d722bac4e41525fa6a9d52a1192712c1fb7c81",
+ "41edff205cf5a8e6af6a9549178a0a2771b29af6",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.dompoint.html": [
- "1d61ce570594205aa7b1f49834c39d6d2e29b027",
+ "6d6a1a6ae05b4b84bdee9e94cb9b3677ee75f4f8",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.dompointinit.html": [
- "f1714a84e322c849a03cee70aa796f3cc95c591c",
+ "132420e34324a3a044fe84a78a2d577f5a9717c3",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.double.html": [
- "f3f5721a729f07c5348fc5e925c7a90aa74ee392",
+ "75a8e924ff427166ea599d8133ed8b7f31f6ff02",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.dompoint.html": [
- "4ecff46aeec9960045585e4cfa61cdf8ac7f5712",
+ "b681b59f4e21679d5188b1ef93288fa0c260bab2",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.dompointinit.html": [
- "e5b1feed32f08d54a11e17f5581de746bb79a6f2",
+ "e5542894b36bfee0b8e9ea97a5e83d4990d49056",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.double.html": [
- "7c22f2457cb3d8004852d55209bb024a33fd7953",
+ "028effa82b1f8b90b06cdff493773bf1ba531a5a",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.dompoint.html": [
- "f897a721cf7e02509aeee773f78c749d13abc935",
+ "d3c16eb4936ea99d49399c621d3ef260ff88e77c",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.dompointinit.html": [
- "826befa02a57063851805ccaefaf9bb65f38d838",
+ "ab5ad3f4da93933ab5f94be82f5296598ea18dfe",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.double.html": [
- "a0db8fa25e374a005501c9d63a3a780afa66ac4d",
+ "ec229e396a8a674191393ebfef1c52238041e0cd",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.dompoint.html": [
- "ac4f0795c68cc771221832dcdd59e884223de972",
+ "5367543fa3d308e18a2a6778502d4097d77febd5",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.dompointinit.html": [
- "b902fb9fce29fc7d1a9259a521d255c6b2e84ec9",
+ "89df524d53a0bbd59ee5e52de1105b84e614456b",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.double.html": [
- "d69e2da221d3f4785b46611b581bc3cc9c15774c",
+ "22ba747b377d1fb33c0d47dec225d854b41a69e2",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.dompoint.html": [
- "f660fdaa6485fb1d9ed620cb5d5163fdcc77a9cd",
+ "b15c29188407f51c4746830119a05c934d2899c0",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.dompointinit.html": [
- "0764d3e0014a761c23d4e72ed852fb50a65ff164",
+ "d9b03a1225b336ce83e229277c0784ac90287f08",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.double.html": [
- "7a2cd952e6087ba8a18dc0f3bd3e0d27c8b16cf6",
+ "62ccf85958200042599fe6099a47163fee774121",
[
null,
{}
]
],
"2d.path.roundrect.badinput.html": [
- "d18e99b4ed10a71ffd0c46eb3068f1d1a070e025",
+ "39e1d0c6554b7cac0717f22fd4e42df2ec2b3c7d",
[
null,
{}
]
],
"2d.path.roundrect.closed.html": [
- "40756e5d941c3bfb183135ad914f02e394614565",
+ "89aeb3b865c6f4b93ba1e869000cd319d679c48b",
[
null,
{}
]
],
"2d.path.roundrect.end.1.html": [
- "10ab8c1fb8320192810fefa34ca3eda0561d37df",
+ "be98ce5841b2e1124e7fa17655a569c261dcf52c",
[
null,
{}
]
],
"2d.path.roundrect.end.2.html": [
- "3b95d1ca88e95818cd2f28a815f2396991b62559",
+ "16131ad345ac0b3b83f5632889b748953ad54ac1",
[
null,
{}
]
],
"2d.path.roundrect.end.3.html": [
- "48fc4988aa8db76b680fb7b0cf88b9813141b3de",
+ "f9454080eb07418c60c8e009bbfeaa6e4a7722a7",
[
null,
{}
]
],
"2d.path.roundrect.end.4.html": [
- "4b70fbc344a736c3ca6bf1127f1698182ccda619",
+ "52d49c32e737905253fe108496dcac4f8b9c5bde",
[
null,
{}
]
],
"2d.path.roundrect.negative.html": [
- "81ffe8c93e4cdfb5d97a99fda527e030f1470b06",
+ "66e1172432adec85ef6f588d2019066e942c0147",
[
null,
{}
]
],
"2d.path.roundrect.newsubpath.html": [
- "892ef6e5f195331059532e707a3b7820218a355d",
+ "df3990a37672ba07b0f821439a29f063cee47ba8",
[
null,
{}
]
],
"2d.path.roundrect.nonfinite.html": [
- "a047b73177f7ae9b5fd18993c1c19d35e8c65b57",
+ "5f0f0b6eafacd84f641101dcba25f59bbeaa2230",
[
null,
{}
]
],
"2d.path.roundrect.radius.intersecting.1.html": [
- "e7675ba35c35ce108814eec2fc7eadb063a39b7e",
+ "913b17e45e907e35e6dcad31215e7d3ed558d84f",
[
null,
{}
]
],
"2d.path.roundrect.radius.intersecting.2.html": [
- "48140ca60ed47ed22704a3b41d57bb1adb2065c3",
+ "abd7f860880cc91636638ff9f8553cef48864cfb",
[
null,
{}
]
],
"2d.path.roundrect.radius.negative.html": [
- "c7c0bda6ff71befc9232dfeedbc5a9fe417557a0",
+ "ac2532dcfebf0cb176d166db4b18c685a49b0aae",
[
null,
{}
]
],
"2d.path.roundrect.radius.noargument.html": [
- "e45b20b7a0762b20c8f423efb5eee16fe3df0488",
+ "cfaf87ecf22d748e4ee95a19732de20e1d03e657",
[
null,
{}
@@ -585924,182 +587166,182 @@
]
],
"2d.path.roundrect.radius.none.html": [
- "16a03c1fdc5d5b77557b5ba574a233007511f63e",
+ "8363285ffc2db4feaab7d7dc7ee947afb8590707",
[
null,
{}
]
],
"2d.path.roundrect.radius.toomany.html": [
- "c6a960b0590d1b67d4e18d437c170dd0957baf51",
+ "d8fe4bb45cc45041447c4a52d227ac247bbf5bda",
[
null,
{}
]
],
"2d.path.roundrect.selfintersect.html": [
- "d644d66e7ca6e4014ed7c140a0058fab319f87ba",
+ "7a69aaf4c6049075b2c364ecbd1f40ae48b089cd",
[
null,
{}
]
],
"2d.path.roundrect.winding.html": [
- "6bcad2c9642c9737c801e4555110c688ab4eb103",
+ "9c1f985eb92af5ac361d675fa5a1336700afc74d",
[
null,
{}
]
],
"2d.path.roundrect.zero.1.html": [
- "690087f0aa0ef4ff9b6fb74512ab46441a81ca0d",
+ "4e9a804dc23cfd93d534160983ad894d4e336ad4",
[
null,
{}
]
],
"2d.path.roundrect.zero.2.html": [
- "cfeb923299a2aa67cc86a4eb3e4261e8b9c125c6",
+ "ac64fa7818c15f210306515d1c270642aa42223c",
[
null,
{}
]
],
"2d.path.roundrect.zero.3.html": [
- "39151f38c76276cefd116b198c85fe8d3e2e7127",
+ "a807715b35290041eba760d131b10512fbd1b594",
[
null,
{}
]
],
"2d.path.roundrect.zero.4.html": [
- "20dccbeaa0b68eecbafbe71f8a09237accc517f0",
+ "fc51918c27d5cc43a5b6b9a9519b2ecd309a1c83",
[
null,
{}
]
],
"2d.path.roundrect.zero.5.html": [
- "bcb84a591710530d85bfdc5ee9576570d927bd81",
+ "de7d41b68fab6d808409552420946d8a199a25bc",
[
null,
{}
]
],
"2d.path.roundrect.zero.6.html": [
- "829503767dc9b88022f0509d00f64ff6f2ad4cc0",
+ "1e8e338a739248c503eb5d260f8e3a32dea27dd7",
[
null,
{}
]
],
"2d.path.stroke.empty.html": [
- "5a2a91bd0fe8ab6de13837c6f3ceb5b6030a02b0",
+ "aa459ec9869679f5204163d0f1f9cc6f3497d742",
[
null,
{}
]
],
"2d.path.stroke.overlap.html": [
- "c1b425d18c7a7fd5a239cb26ff11499e09054bac",
+ "a577f22769721e191671ae660f468e5105aba584",
[
null,
{}
]
],
"2d.path.stroke.prune.arc.html": [
- "abef923f6a6db5638ffec013cdcfd6262a01727a",
+ "6474a15424c3cfa08bd5f92bc1df3d6138815d29",
[
null,
{}
]
],
"2d.path.stroke.prune.closed.html": [
- "4515669bc8e536670d7ece6bee7af68a8d63ae82",
+ "16b46852a1b1ac6160608eaeb40e7494069555bc",
[
null,
{}
]
],
"2d.path.stroke.prune.corner.html": [
- "532c74659500dc2758eec6caa4d4693ad94e2d4e",
+ "226fccc6d4bb93393eeca5f15f0a7bc7f0595c96",
[
null,
{}
]
],
"2d.path.stroke.prune.curve.html": [
- "6055d8b3f4c46aba63804aa52d0ee7efc4146ee8",
+ "8023b7b3f934682ec625ec8871243cd5af72c5be",
[
null,
{}
]
],
"2d.path.stroke.prune.line.html": [
- "2d8dcbe49954e6fe3ae2fa187a81b0c967680f31",
+ "97f88847c0b5cb634f085755ce7238b8c6534fdb",
[
null,
{}
]
],
"2d.path.stroke.prune.rect.html": [
- "28b02ca3255633527496f838e9ffa21e40134431",
+ "bf1fc9aa20780826cdb96e1e80b05732fb2f7b32",
[
null,
{}
]
],
"2d.path.stroke.scale1.html": [
- "29ccc6613dace91eeff0848315b2a6fd0579f1bd",
+ "3e4651ec4a1f0f15eaf958df4a56c1a7420130a7",
[
null,
{}
]
],
"2d.path.stroke.scale2.html": [
- "bc72c5c140f80bf8382f2627074110da4f6e2222",
+ "099efec76c477679d51d6e5b3ac31bb60d06012c",
[
null,
{}
]
],
"2d.path.stroke.skew.html": [
- "b902a1dc2754c0fd1bffc3f53d5bdd8f6f67a8dd",
+ "86f3eebf1d5f8a1393ce5c2ed38afc8630e5e13a",
[
null,
{}
]
],
"2d.path.stroke.unaffected.html": [
- "9b05a6aa0dbb9e62eec3230c4deaecf6562e8fd0",
+ "8e6b41946fb37d79be6e79e2b693acc6c37df1f3",
[
null,
{}
]
],
"2d.path.stroke.union.html": [
- "daa8da9349378e75078b432212a3b35af20a0f9e",
+ "73198ab24d18b127aa2067138b8aa1e98f6e3e9a",
[
null,
{}
]
],
"2d.path.transformation.basic.html": [
- "d77b66a68fc9624becca5cf7e2757a2cbf0662da",
+ "1cdc81e4f65bfb36bd3c14cc6ba2cd2c2d427c7a",
[
null,
{}
]
],
"2d.path.transformation.changing.html": [
- "5f79285a81dd413673df7dff5c7457f9f99a3b20",
+ "8f711b6b9ae51919629d69bbacaf216ee89318a7",
[
null,
{}
]
],
"2d.path.transformation.multiple.html": [
- "aafa11c127b6ff4385510ada8fcd1f95d6558a87",
+ "af06c0637137bc8eb99d31fadabc02fb15546309",
[
null,
{}
@@ -586108,280 +587350,280 @@
},
"pixel-manipulation": {
"2d.imageData.create.and.resize.html": [
- "49d029267cf15e95c194a1c93dcca895ea396a60",
+ "1ecd3fbd655f30955ebfa58ff211161d1e127b63",
[
null,
{}
]
],
"2d.imageData.create1.basic.html": [
- "aa1ca36182e7d08c339af8e09070a6a2c5b26d42",
+ "1ea73690e899b7449366fde11127029c9f0d454a",
[
null,
{}
]
],
"2d.imageData.create1.initial.html": [
- "1d8ffbf0000509fb7611db9a74ed370170d611f6",
+ "8709623a0c8de01e58ee570e7e9e341d666b1f12",
[
null,
{}
]
],
"2d.imageData.create1.this.html": [
- "c98aab3ff44f8bc719b63f4bab27248d70f2c44c",
+ "dd4b80ec083f6d0595c99851d569ac3a398a5bc3",
[
null,
{}
]
],
"2d.imageData.create1.type.html": [
- "f339dde2364baf2edc8fed19489a9f55e122ea98",
+ "36f3db99be37431258862ffb9c17f0e45161e2a3",
[
null,
{}
]
],
"2d.imageData.create1.zero.html": [
- "06447cb69079efacd3eb4ec261bb7290062d3a80",
+ "02619376a1b3722e5078922bd39421c8a8580e7e",
[
null,
{}
]
],
"2d.imageData.create2.basic.html": [
- "017d9cfe2861aee6048a1f43258dbfaec790e3bb",
+ "807b6dbfa21d0d95dc1dea49697556b3b5a8b285",
[
null,
{}
]
],
"2d.imageData.create2.double.html": [
- "57b912bc7feaaca7f4a1ecbf8ac3a93d7f44ab09",
+ "31aa42d5a89e5de7a4fd8488e82520284e7cb3bb",
[
null,
{}
]
],
"2d.imageData.create2.initial.html": [
- "57cb7ce926f6a634cd978edb6c4d3ed992dc2c71",
+ "c2a69b4c06c49cef7202bfd940649ea7d8a1c484",
[
null,
{}
]
],
"2d.imageData.create2.large.html": [
- "8daa111db535e3cede7e8e45ce0b2d872a2500bb",
+ "73b2a1c19f29c89642cb25f369dee326a11d76aa",
[
null,
{}
]
],
"2d.imageData.create2.negative.html": [
- "87c0ca26d074999418569851c945076140331d84",
+ "7c4a3944eb067668641c4b328ef350e90b532950",
[
null,
{}
]
],
"2d.imageData.create2.nonfinite.html": [
- "55fcb761fca1e62668119e3518b6e2403c72c8d6",
+ "af30dc9124bd8891dd8a826e7025cc17f82948f4",
[
null,
{}
]
],
"2d.imageData.create2.round.html": [
- "045cd0610cae9512cce406fef7f2248921edf63d",
+ "c62243f41857cd443a8f768e838ccde2ce04ebf6",
[
null,
{}
]
],
"2d.imageData.create2.this.html": [
- "1937609c8783a52d45b6e13a196ed136cb94555f",
+ "f5373d0eddd205accbbd20311ec18eb67d167c36",
[
null,
{}
]
],
"2d.imageData.create2.type.html": [
- "2ca1706f7f76a7025298b736ca3eed5d8ce554a2",
+ "d595d33845864c6445a0a6ffcfae2aacb1647a2e",
[
null,
{}
]
],
"2d.imageData.create2.zero.html": [
- "c23ca70eaf04a447b6657a45ba3f0300039b8000",
+ "cc949162d3bcc53d3dd6a7e91c427c68276f89db",
[
null,
{}
]
],
"2d.imageData.get.basic.html": [
- "a4762aca953a6497aedd773934993e5cbd1775e7",
+ "5f8f1995401168d83b7a97d623f3103753249af7",
[
null,
{}
]
],
"2d.imageData.get.clamp.html": [
- "3c0b1750a51b4d1a55adc3aa9d221edf534ac0af",
+ "0047e910b7878336cf54eac416d10fa1e44f6f51",
[
null,
{}
]
],
"2d.imageData.get.double.html": [
- "9ff3e9a132b2a8a80dabcd326b037395bba1cbaa",
+ "5cea5fcbc2322d45f1e0b07cbd420c6201c3e7ad",
[
null,
{}
]
],
"2d.imageData.get.invalid.html": [
- "dd6cc755784fe240c46fb55ed4334141811c8622",
+ "689e72f69bcf5392e7d186299c21228cda5c69c9",
[
null,
{}
]
],
"2d.imageData.get.large.crash.html": [
- "cb8e60640048149a9ca946ab92acc3403c1a2f6d",
+ "f41eec7b9bb615f1721a809c9f14cceb6ffd0085",
[
null,
{}
]
],
"2d.imageData.get.length.html": [
- "be99e1e5255b03b70e341ecff9daed2aeac0b090",
+ "41b9832025f351e8c15f94839f4d1a4e66722379",
[
null,
{}
]
],
"2d.imageData.get.nonfinite.html": [
- "a5884606d7b9d26a4647dfa0746df8e4e27dd600",
+ "a80e905cfd368e3b0202264d4133181946a23f16",
[
null,
{}
]
],
"2d.imageData.get.nonpremul.html": [
- "6c8599846c6f434075a0df0fccc4eeaeca16616c",
+ "bc833c2198f6166ab36e44495a28d9edb74b1f7c",
[
null,
{}
]
],
"2d.imageData.get.order.alpha.html": [
- "6b368aa7d4c29d3f1ee319973156ed3a597bd985",
+ "e5b57f650e2197193f7c86572d8afa5c4b520dae",
[
null,
{}
]
],
"2d.imageData.get.order.cols.html": [
- "23ff82c0550f66901eb46ab0b1ac2b9f4dae4a82",
+ "66fd984ebd8abdb5b5e4560876f8a31e29fda358",
[
null,
{}
]
],
"2d.imageData.get.order.rgb.html": [
- "db297dd55c7fd1f778845af690545464750c06f7",
+ "4d15ce792774a72dd23c9f3bd08ae56bb50a497d",
[
null,
{}
]
],
"2d.imageData.get.order.rows.html": [
- "332bc053027e5484b10108c30f71846e3b9883a4",
+ "086ce322e04844d3d77903e28903bea29702d655",
[
null,
{}
]
],
"2d.imageData.get.range.html": [
- "f5dfa6bb8aecaba2b780b0807b0731c356db05c4",
+ "d9211917729615aa7294a2f71a1b68810ed288c2",
[
null,
{}
]
],
"2d.imageData.get.rounding.html": [
- "7b9ab46fab0b6dc86ddea144e845e5f7b33569b5",
+ "9255be087b6665ed780f671475bcd922715f0893",
[
null,
{}
]
],
"2d.imageData.get.source.negative.html": [
- "7e705896f2e27b40ac10b18ef0dc9f298abeade7",
+ "0b84b1cacac04051cc9aa90f633e6b4e2e6e97c9",
[
null,
{}
]
],
"2d.imageData.get.source.outside.html": [
- "ccc75a2e01f12dcf86f74428bc6fcc26cc2c382f",
+ "fca97f2e6f6a338297520baad7c3214f1d89409f",
[
null,
{}
]
],
"2d.imageData.get.source.size.html": [
- "418b2e3e39441090b8ce47951ac565b2d98a931f",
+ "800edb8baf5bae5d32aa366f1cdd4641f9110f5e",
[
null,
{}
]
],
"2d.imageData.get.type.html": [
- "d030dd409c951c15f573f60f4d37ad4b0f5d07c8",
+ "748d46b166bbed13fb2f615aa6fed745f801cf35",
[
null,
{}
]
],
"2d.imageData.get.unaffected.html": [
- "15ad997d5f1bc41181cd4a5066dd1fa91508cc60",
+ "f2f4a2e4fa03ef8d7c0b8dbe36a76045dcaf5308",
[
null,
{}
]
],
"2d.imageData.get.zero.html": [
- "3139003dfc7d0150e7b734328c1b11b18ba81465",
+ "438bc2fb1e8b1668a065a782b95a9aafd73cf970",
[
null,
{}
]
],
"2d.imageData.object.clamp.html": [
- "e3a17ed66281e64b655b73f79f3015857c92c485",
+ "df8ef1ba20c23987b3cd54e12d26ab6e13ba9b2d",
[
null,
{}
]
],
"2d.imageData.object.ctor.array.bounds.html": [
- "7c6e0178fdf44856edfddfb06ed8b5147a74254c",
+ "01affeb947f52e0e659ffa7b6cc04089023dbf63",
[
null,
{}
]
],
"2d.imageData.object.ctor.array.html": [
- "200b7eed934ba428b34a388f781d8e578805c978",
+ "0cdc025764b43e793ed474a1ada6b88350d6ad81",
[
null,
{}
]
],
"2d.imageData.object.ctor.basics.html": [
- "b01b9da51b8cd662f95c6dd33d44fac4f75fac73",
+ "f7811e7441c99ff6acc40d7ee11ae36f1a65fdc7",
[
null,
{}
@@ -586395,175 +587637,175 @@
]
],
"2d.imageData.object.ctor.size.html": [
- "e7480501423ed61653e5b3048707cabc40fc4575",
+ "a11d8e234001482cf8c2064a2db69324b12ba084",
[
null,
{}
]
],
"2d.imageData.object.nan.html": [
- "496686bbfaebf01b115bc29ee3075dfc8c970f2e",
+ "974b5898a31bb7e9228ed5bac240fd6ef1882d08",
[
null,
{}
]
],
"2d.imageData.object.properties.html": [
- "ed03fce9832f018ddb97bf8d2b5848a5107add54",
+ "7eefdb2f554592529a592e1760bcd2e4add500ba",
[
null,
{}
]
],
"2d.imageData.object.readonly.html": [
- "3b2f7051b1a548fb80b8f561a7b946120f083f67",
+ "f002466bab56895f8aa9b97cffaded6506bfa3a9",
[
null,
{}
]
],
"2d.imageData.object.round.html": [
- "d052930d5250e5d1992da9850cfd49c01fa01b75",
+ "0f7da4fff55df86c0543802e8a8204fac34232db",
[
null,
{}
]
],
"2d.imageData.object.set.html": [
- "6afa7e87630e9460ef5c9cef1d6f4ffade0831ba",
+ "3d03bd6769c99849b14fb586896419cea620c1d1",
[
null,
{}
]
],
"2d.imageData.object.string.html": [
- "d54594a15dcdb690e70eef4bbf7049dc05964651",
+ "eda6f2838da0515e2fc7c19ee335d613cb0bc8bf",
[
null,
{}
]
],
"2d.imageData.object.undefined.html": [
- "3013c886886d3d3141f1dcb654fc50afcad0b921",
+ "96867bec4a6cad0c85babf2ac3f26f6a195c904a",
[
null,
{}
]
],
"2d.imageData.put.alpha.html": [
- "ae8ad977766d3bcf66f5b218bc2cbd2fc582f278",
+ "6ee38802f62bacc68b7a77d28d1587c188c686c1",
[
null,
{}
]
],
"2d.imageData.put.basic.html": [
- "9a7021fd56a6885010058748d13a1fed91b5ca37",
+ "17f7d3e8e6ebbeee554ea10493443fbc9bca423b",
[
null,
{}
]
],
"2d.imageData.put.clip.html": [
- "229b8129563def3299a3889334c9d4ee60e2d982",
+ "948f617095117f7ef5a9bc90b8ae8440d2e86c17",
[
null,
{}
]
],
"2d.imageData.put.created.html": [
- "3f515b2523ef68173fbf27e700efa7c82b745982",
+ "4db45873a1706ee8e0c9f4ecbb71d2c9ad623709",
[
null,
{}
]
],
"2d.imageData.put.cross.html": [
- "282ad03e6d5e9419763c56baed4b2236e365dde2",
+ "10226834a30a803a7481581e52b6defd79fece8b",
[
null,
{}
]
],
"2d.imageData.put.dirty.negative.html": [
- "81226e6978f43b42d4b60498e2d0879ddfd0a545",
+ "efaa6f255087d60fb12389da28bf8ab243fb154c",
[
null,
{}
]
],
"2d.imageData.put.dirty.outside.html": [
- "8750c332d60b1d52a1fd7856d34b81c46d39a1f0",
+ "86a77369f0569d72566d2e450560e33c8a2daffa",
[
null,
{}
]
],
"2d.imageData.put.dirty.rect1.html": [
- "104896d20173c1f75e76d89d9739170c6c06e6ce",
+ "786db5ac4f61c274870c92a92fbc7d3d5bccc30c",
[
null,
{}
]
],
"2d.imageData.put.dirty.rect2.html": [
- "7acb2205a357368741f456c14f230cc68861e1c9",
+ "f5f8a3a0d1e353c68661c1585f75ed5cf4b769ff",
[
null,
{}
]
],
"2d.imageData.put.dirty.zero.html": [
- "336e02a35a2688e20d408170a89081c625d6b07b",
+ "d3799104dd0cf01e25a37e63383bbeb065da9391",
[
null,
{}
]
],
"2d.imageData.put.modified.html": [
- "f5f085a0010e95ccd17e8483d4ce3afb80dc638f",
+ "70b70a866f0b3f681fd8b38decde89e5f48fc906",
[
null,
{}
]
],
"2d.imageData.put.nonfinite.html": [
- "a5c956babad9548ac12918df2b508d6b40ee1f26",
+ "ab03f9f20fa34ba16ef28bbca9f0259e61be8d30",
[
null,
{}
]
],
"2d.imageData.put.null.html": [
- "068c664f0a33d5e609dc0cd7dbb75204b550faf4",
+ "4ed429fe7c7278b562cfeaffe7a6ad0b4b69455e",
[
null,
{}
]
],
"2d.imageData.put.path.html": [
- "b81054d2281186da5a89241a7b6a067ba42dabb0",
+ "e32d7cc257be9e92d38ddfbfeb8024967417005f",
[
null,
{}
]
],
"2d.imageData.put.unaffected.html": [
- "345cb5cbc71fb1cc10e0b89456d651adbb031d25",
+ "bad06b745f4c9fd1ece92a117d0f82423c4161e5",
[
null,
{}
]
],
"2d.imageData.put.unchanged.html": [
- "cf800bc666afaeaec38e7106ff07977d8d945c1b",
+ "026e4347ed99b774fa83ac223405e9f14c25b53f",
[
null,
{}
]
],
"2d.imageData.put.wrongtype.html": [
- "88386f028f9dc146919b51bb97038b697e7aa5cd",
+ "9e43b1fbe9070b8db86f9a741fba044b1a49f0e9",
[
null,
{}
@@ -586572,7 +587814,7 @@
},
"reset": {
"2d.reset.basic.html": [
- "8f63730851df9173343188dc60bd18a3445f5e14",
+ "0753ec6da878aa7a0a95fa5130db81ca0b96ef5f",
[
null,
{}
@@ -586581,28 +587823,28 @@
},
"scroll": {
"2d.scrollPathIntoView.basic.html": [
- "8263eb7b8080e4c2b2d6530739fc8056dcdbc338",
+ "e4cf8ea9ad2add2d46cd2b7750853486f675d416",
[
null,
{}
]
],
"2d.scrollPathIntoView.path.html": [
- "16327d52b5cbe681dc1b0b8836ee6cdf0e7505fa",
+ "ee1f833aaf38daf9e8776b30932ff8331edc2421",
[
null,
{}
]
],
"2d.scrollPathIntoView.verticalLR.html": [
- "14b1e30ff7d9cc73bca5bf0c4b366835ab23eece",
+ "9d09980b6f0a35930a3c593ea1292b16ea9d5969",
[
null,
{}
]
],
"2d.scrollPathIntoView.verticalRL.html": [
- "cf91abe9755da7094279284c593011e502105ab3",
+ "8193106f8e8b7d0063cf364c0b7def61774e2662",
[
null,
{}
@@ -587359,154 +588601,154 @@
},
"transformations": {
"2d.transformation.order.html": [
- "7fe6dbc133c988a2aad7a18919068fc339535e1e",
+ "6c97bf7426f37bb0b657658a2678fe87cb9e0521",
[
null,
{}
]
],
"2d.transformation.rotate.direction.html": [
- "756b5ee6670bed87e831eaf16282ad24fd1b31f3",
+ "0b583cd6785d51da7e541519a6c9bb41f0c766e9",
[
null,
{}
]
],
"2d.transformation.rotate.nonfinite.html": [
- "93839c6427e2d8df21a01841980baa5bd73a0a27",
+ "3e685fa7a812a56c7b7f9ddfbd8daf2a7d32ba93",
[
null,
{}
]
],
"2d.transformation.rotate.radians.html": [
- "fabf9da24f04bf0546a170b8fa603046d4bd0beb",
+ "63f895a0de12e8ce94863c159c94effb78954dfb",
[
null,
{}
]
],
"2d.transformation.rotate.wrap.html": [
- "05cb3073ee2ab89d9768015b435109ab681fe9ef",
+ "9b923e00084a5beb80343f8dfd289bf100385e9a",
[
null,
{}
]
],
"2d.transformation.rotate.wrapnegative.html": [
- "9eae3c5214d43c5361213ea29b80e25007180ff5",
+ "96894ef20e2743fc197ae1c2ae2943fb38ac6067",
[
null,
{}
]
],
"2d.transformation.rotate.zero.html": [
- "54ad6aa138527f7679420509dfabf4a716e98122",
+ "7026ea9d1b11ea34bd7006bfcabcda9bcc4f27f2",
[
null,
{}
]
],
"2d.transformation.scale.basic.html": [
- "0573702bd8622fd6195d32c7969830d2936e1353",
+ "7e4b3593b19312d6c74fcde50b0601103fc29945",
[
null,
{}
]
],
"2d.transformation.scale.large.html": [
- "65fa9ab8da0fd4d1f5872ca989ba79f154149510",
+ "ce7f6d9faefeab06b69188190047ebf9187bc37b",
[
null,
{}
]
],
"2d.transformation.scale.multiple.html": [
- "5bf837ccd76d5d6e7b51d08f33e98be8327d3ca0",
+ "73bfbc87c18c92b2996932d7ec73817032f824c6",
[
null,
{}
]
],
"2d.transformation.scale.negative.html": [
- "e7085999a2b814baf2d764380b5a71c0ecc00ea3",
+ "a5aef69b63b2dc96afe407fabbaa9e8272f0b1ce",
[
null,
{}
]
],
"2d.transformation.scale.nonfinite.html": [
- "59b154904523ce0f52936b003396b54fb10fe0a7",
+ "c06f96eb22215e893d98b17c2b7b22a06391952d",
[
null,
{}
]
],
"2d.transformation.scale.zero.html": [
- "f495ee2e6a0a194e65f37ce8edb62bee9c23fce3",
+ "ae15034a194d3e84d3fe47741abea7167cdbbfdd",
[
null,
{}
]
],
"2d.transformation.setTransform.multiple.html": [
- "5fa910a5b1115101273b9c3ad985397f0c0c3f1e",
+ "099831e6383cd776a2518304467cfc77ab5ae08c",
[
null,
{}
]
],
"2d.transformation.setTransform.nonfinite.html": [
- "fea3799a41f7fab9421dc8abcebd66a5c6b0ee37",
+ "019493ad16244fa7260ba3974768377b7bdaf9d0",
[
null,
{}
]
],
"2d.transformation.setTransform.skewed.html": [
- "e78a07897b574142d0dac576a49b4a93ea30f731",
+ "f6f8655b1ed308cf535160c50515fa27ba689c83",
[
null,
{}
]
],
"2d.transformation.transform.identity.html": [
- "c9742ac210ccd4500c98cb0ededf1b0b4cc792dc",
+ "be5de19a458cb5478b6b1b8ceb9109b676185b6c",
[
null,
{}
]
],
"2d.transformation.transform.multiply.html": [
- "04e5adf4c86a4a10fa7374b704ed0524d2e453fd",
+ "1e8e4cccdf5f41913c05f2d44ea629c13bae2ea9",
[
null,
{}
]
],
"2d.transformation.transform.nonfinite.html": [
- "b94da2c381885c4dae177840c823191d7a95e6ec",
+ "d3fae8520cad56f35bbc365dcc8b9c90a4ec8aa2",
[
null,
{}
]
],
"2d.transformation.transform.skewed.html": [
- "35cf997eb0ab2b0e56c33855fa88fda90e3a4bb3",
+ "c69756bc1d9aa8f94b8beefce306113ecc35032c",
[
null,
{}
]
],
"2d.transformation.translate.basic.html": [
- "967d2d2761448797d49ba81e35b61e4ce0da1c2a",
+ "189a1544b60deaeaf1d82913d81eb28aa4c75f18",
[
null,
{}
]
],
"2d.transformation.translate.nonfinite.html": [
- "83a8ebf7ba8c44cd8435739eb6c7b31ebe643b60",
+ "0857693aff9391830cc7eac87db46209e30930ee",
[
null,
{}
@@ -587515,7 +588757,7 @@
},
"video": {
"2d.video.invalid.html": [
- "49062f02cc019da7a9915f5c5d1944c7c745d09d",
+ "22b4e054f8a8f53ff59b7079d12ab562efe14976",
[
null,
{}
@@ -587524,70 +588766,70 @@
},
"wide-gamut-canvas": {
"2d.color.space.p3.fillText.html": [
- "5c1a6008755ff6c2947bb6b679e1a99a775b48c3",
+ "9c3d1b337477aa2029082580687833afee1e4118",
[
null,
{}
]
],
"2d.color.space.p3.fillText.shadow.html": [
- "3bb74c6ae4aba54f7cc0e46ecdac1cfcd938d00b",
+ "cc459fb2cdfa8a2a16a23e7d586511c8f8e3dca7",
[
null,
{}
]
],
"2d.color.space.p3.strokeText.html": [
- "c38084a44490bed59ceddaae9002467a1254dafa",
+ "626a41b49b43722f331746fdd345e976d7e3a458",
[
null,
{}
]
],
"2d.color.space.p3.to.p3.html": [
- "063012f2826e5c1888fff3ca26c19b01b7419a35",
+ "a03f49740f11bdcb67b0a562426977e3c95e7498",
[
null,
{}
]
],
"2d.color.space.p3.to.srgb.html": [
- "2cbeaf3b9b077751e606aab501d507e9f5f82ec3",
+ "0433ae38c72a8db327df5304f4f6b8a79227ff07",
[
null,
{}
]
],
"2d.color.space.p3.toBlob.p3.canvas.html": [
- "ef954e4fbbea2987733c5011f0389f4b54825f00",
+ "1a44af20a6381a9dd9270323323a8e0774a2fa2a",
[
null,
{}
]
],
"2d.color.space.p3.toBlob.with.putImageData.html": [
- "609310e1c68bd3a7f7b85464a6eb3e6a8c251884",
+ "a53de722593b5bd30636aeffd108f9d14cc6d4e9",
[
null,
{}
]
],
"2d.color.space.p3.toDataURL.jpeg.p3.canvas.html": [
- "b07a0d645d3271a6fa9720ea5931775f53425041",
+ "e0986cb8e8ac1d73a1b3bd7a71854a9d86b27aa7",
[
null,
{}
]
],
"2d.color.space.p3.toDataURL.p3.canvas.html": [
- "38b6429831409cc85e519c97e087d68aa9f421f9",
+ "94ba7039803f0d401e8d8631313259c4a42bc046",
[
null,
{}
]
],
"2d.color.space.p3.toDataURL.with.putImageData.html": [
- "7eda499e73e1acc9a45ba05812d1b2ca1167fdec",
+ "58d0718ebad80ee3ded58870462f660477b78fb2",
[
null,
{}
@@ -587962,126 +589204,126 @@
]
],
"2d.composite.globalAlpha.canvas.html": [
- "90825d29d246268b39f837cf157f729022f5fb6f",
+ "c096253e27016592e6f4760410c5422168055d0d",
[
null,
{}
]
],
"2d.composite.globalAlpha.canvas.worker.js": [
- "fe644f2ca3e5be88bbe7d0c2df04ce8160729b08",
+ "ede4733a8315521b495ecd1b79d2fa30ea17ebf4",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.html",
{}
]
],
"2d.composite.globalAlpha.canvascopy.html": [
- "15db07d6c1e6e918092820f0342706113247c62e",
+ "2eb06556eff2a967723a428f8916be22c9135004",
[
null,
{}
]
],
"2d.composite.globalAlpha.canvascopy.worker.js": [
- "e0ef84a78b46dc52268a7eb08e2f79d243fcfbc0",
+ "f61859d2310c210e817a12dbc6811748988f388e",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.html",
{}
]
],
"2d.composite.globalAlpha.canvaspattern.html": [
- "f6ce643bc8ac3c592210e8d3a73a0c4cb51b94aa",
+ "cbfe1110922369a266430608027bf0f3800a4d70",
[
null,
{}
]
],
"2d.composite.globalAlpha.canvaspattern.worker.js": [
- "2fb494d054a410067b9bc79959271cf495bc9b91",
+ "7ecd568fae8943511a41e1d76b4ee03556ff01e2",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.html",
{}
]
],
"2d.composite.globalAlpha.default.html": [
- "3d6983f90ce95f893c4b9ffe40dedce5bca01d10",
+ "57c3745d4e1707f6ca1ed3dc20638ca650423c0d",
[
null,
{}
]
],
"2d.composite.globalAlpha.default.worker.js": [
- "921c401551e4ecc31728366cdcd6d692e151ca9e",
+ "8acbd6a37fcbd05bdfa7cba6e3044f4d9937990f",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.html",
{}
]
],
"2d.composite.globalAlpha.fill.html": [
- "f2410facc071add961ab5d621ac487181fc6d575",
+ "7b31db198e5cd5b0f9d9a03979487b515720314c",
[
null,
{}
]
],
"2d.composite.globalAlpha.fill.worker.js": [
- "f354773bf467ecc214f560281508ad5dc431e8ad",
+ "3ea8aa7ebeeb79bcef05c8ef3fcab66c0b18673d",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.html",
{}
]
],
"2d.composite.globalAlpha.image.html": [
- "cd7ee9cf2a5ea7313a84b0842f71ea3f6ddce4a6",
+ "4590a2ea1fee7cac3c2d1bec82df899fdf82f895",
[
null,
{}
]
],
"2d.composite.globalAlpha.image.worker.js": [
- "1c804a3961e4560833f427f3b8eb80a1f1e549c5",
+ "20953417ccf2c624121fe73b4a4e7307d0f59700",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.html",
{}
]
],
"2d.composite.globalAlpha.imagepattern.html": [
- "af1ca48e9d894bac428139d7a8cba34cfec896dd",
+ "2fcbca84d219dc556dc1103ad3281b30031106dd",
[
null,
{}
]
],
"2d.composite.globalAlpha.imagepattern.worker.js": [
- "58ef4f3b9dcc3cfd14f4c902684c369d548e05f2",
+ "c6ab163b65b0c236e400c2233b1c76c211a9c812",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.html",
{}
]
],
"2d.composite.globalAlpha.invalid.html": [
- "a4149ced9f28e43efe7dab4f531099999f2bebe2",
+ "9bcf85f1c459d8a266881866cca137d69ead245d",
[
null,
{}
]
],
"2d.composite.globalAlpha.invalid.worker.js": [
- "88f017dec7ddc5e5767fc63cbbb686b31226e0a3",
+ "4ca577ad440a1cce21137d30f33fa263825ef626",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.html",
{}
]
],
"2d.composite.globalAlpha.range.html": [
- "05736827be7c3f6ecb6a548ffd5d40b46f8d9b82",
+ "c064a41cbd90169585a6bf6249f464f8c1b03be6",
[
null,
{}
]
],
"2d.composite.globalAlpha.range.worker.js": [
- "cfd08366654080ba340e6765dc0b73c75f178362",
+ "76ea8199098457c5b47328660fbfaf883fe9ddd6",
[
"html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.html",
{}
@@ -588256,126 +589498,126 @@
]
],
"2d.composite.operation.casesensitive.html": [
- "f70fad638c2cb4ce481ea5987a240135edb683bd",
+ "f21b92f83e3309b594b6c07a6ade04ef0d6018dc",
[
null,
{}
]
],
"2d.composite.operation.casesensitive.worker.js": [
- "b6f7adacb949e5a9bf262f52d08a8a8cdea6c863",
+ "db1b54f5efef392e4f34996c15064f295868449c",
[
"html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.html",
{}
]
],
"2d.composite.operation.clear.html": [
- "0ffbc9eb2e606f48e038ad6d933a83783e3bf866",
+ "02496b6d89c1728d82dacd7f5f7f845e51d73c52",
[
null,
{}
]
],
"2d.composite.operation.clear.worker.js": [
- "e911da202324197b9615653cdc0b2ba204749dd9",
+ "947dd16c5f962002ff9d71be739ea5c709b73a2c",
[
"html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.html",
{}
]
],
"2d.composite.operation.darker.html": [
- "f4240b4e6e11450c303155a8057adf21790ae4cb",
+ "29dc039157ce6c5367447d108d0a2a9366e977ac",
[
null,
{}
]
],
"2d.composite.operation.darker.worker.js": [
- "c90d4828e4233c0031c6108ec9255278b7af6324",
+ "528f6b93d949c6a112f51222894a41b9dd4d9caa",
[
"html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.html",
{}
]
],
"2d.composite.operation.default.html": [
- "b18d17b585a352ef883d0dce7c9cbcf327a8b75d",
+ "106c0e73f4b2b22fd63de3413ff8e9557d9dcbe3",
[
null,
{}
]
],
"2d.composite.operation.default.worker.js": [
- "691c153ea7a73514a3d0cbc19a5327729edcc726",
+ "ffdb75ad75a04d9b5b1415c4d432e8f2883a21e6",
[
"html/canvas/offscreen/compositing/2d.composite.operation.default.worker.html",
{}
]
],
"2d.composite.operation.get.html": [
- "ff12aa593e2479182b2cc999139ae207ced4169c",
+ "1ade1a4e54973581d5af7a646826ff2db5bf8c47",
[
null,
{}
]
],
"2d.composite.operation.get.worker.js": [
- "9009536ef7e6114affa28d804c514fda710ccd4e",
+ "a266f1d537d5a06b8044ccd60d8f03756ce6726d",
[
"html/canvas/offscreen/compositing/2d.composite.operation.get.worker.html",
{}
]
],
"2d.composite.operation.highlight.html": [
- "175d7184bad5f124e34b58e4b468273a80b49336",
+ "08def9a516bbdf0dc2e3b6ff993d593c73169447",
[
null,
{}
]
],
"2d.composite.operation.highlight.worker.js": [
- "234893aac7e8c42eb144a0f6a18bbb1166afcbc3",
+ "800c4605e6241f97846cb7a85e340f960885d623",
[
"html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.html",
{}
]
],
"2d.composite.operation.nullsuffix.html": [
- "6572003dc3b959f44977fc4e415b141e48466be1",
+ "f021d40b53e4f819cdf5b8339b2d8777a8047c8e",
[
null,
{}
]
],
"2d.composite.operation.nullsuffix.worker.js": [
- "ee3266e18af5354ecf37d40266b34937a68c5936",
+ "1c1d5124a3479b82373ad8d533b50b00553bce1f",
[
"html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.html",
{}
]
],
"2d.composite.operation.over.html": [
- "950ca3d687b69aa88dfadca2a6a5f6e727a590d4",
+ "df934336c623b16992ee98e25f7de891efdbfafc",
[
null,
{}
]
],
"2d.composite.operation.over.worker.js": [
- "97a4209c8382ec100b7aa2347f5906ed804450af",
+ "f75a462e935549e57b645a70995b17bdbd501c3d",
[
"html/canvas/offscreen/compositing/2d.composite.operation.over.worker.html",
{}
]
],
"2d.composite.operation.unrecognised.html": [
- "31a4639056c3feb2dbb19aa19641e79b892adc12",
+ "c649102cc71177c6e10efe8f6e25888e5aad9f7a",
[
null,
{}
]
],
"2d.composite.operation.unrecognised.worker.js": [
- "d02e9f1aa76eb366c5af3774ab80ae7bff84ee24",
+ "23a6630e82a7fa0b619a653bf7826f387fbd76b6",
[
"html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.html",
{}
@@ -589010,28 +590252,28 @@
},
"conformance-requirements": {
"2d.conformance.requirements.basics.html": [
- "6846bd89477d56828a7494b06c37e2fd484c6694",
+ "e754e6c6ba9dd04ab84e096949c31f940eadecb3",
[
null,
{}
]
],
"2d.conformance.requirements.basics.worker.js": [
- "8d6ddc894f6c17a50e37d646b774f5ef1c3942bf",
+ "b16a39fd3c978067a79f7ad1f94506577fcc3689",
[
"html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.html",
{}
]
],
"2d.conformance.requirements.missingargs.html": [
- "e6930c0ac5f3b3a411f4877e1e001b5ecf2a8695",
+ "fe28a68e9020b1ece9634ac5a1c909a0c37f970a",
[
null,
{}
]
],
"2d.conformance.requirements.missingargs.worker.js": [
- "fe1b111f05be3582189724d982a6f1d92292cb66",
+ "f249fcb881a831f085a6443af502130e35e395e6",
[
"html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.html",
{}
@@ -589040,1106 +590282,856 @@
},
"drawing-images-to-the-canvas": {
"2d.drawImage.3arg.html": [
- "a371d91431b8e771dbe2f77ac92e38822f17f662",
+ "7f1f66654d4b2826c070dd425ee5b4399d724f9e",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.3arg.worker.js": [
- "22cb3653e41f1e7aed74563f3bc69a2b1035bad0",
+ "b2f860bc606884f9e8870a7a5107ee4cfc4312dd",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.5arg.html": [
- "18ae25d829c48bd5ef7ef0b57efb0c343c57b808",
+ "f7bf0568c4ca11d0912c8376b87e9c2695a61a43",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.5arg.worker.js": [
- "3906a5a00b374c57d9fedd93864e35ee28c45169",
+ "f725acf0118af0766afbb43871f48a610dc822a5",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.basic.html": [
- "508376cd60cf205030b56c3c9fe22135890af549",
+ "47e442e23eb2226a31e8614953af680c0071239a",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.basic.worker.js": [
- "36770f779bea8bdf9d21189fe8418737ea03d43f",
+ "b2d6f7d860d57331a60ef34208eb22479f79390b",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.destpos.html": [
- "079a57ddbc1cfc5df2ca18b206b64bbd9eef4a21",
+ "5e0f3f108816c1520fcdf29675a354b04f8318ba",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.destpos.worker.js": [
- "81fdae81df620b1c6291004f15555643eb60ccae",
+ "380d526f9b4ff6a1571ad073bac1cf6096a5a9f5",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.destsize.html": [
- "1996227c352df0fe7f2ce10b8127e0245628d117",
+ "93b587a44ffbb95bb25bdd1e3fbd9f1b82f0cee8",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.destsize.worker.js": [
- "60fea26afe3d9500ce6297c7e292ce5011732891",
+ "76e3e8baaf1c9d03a38bb93cd567c308bc7b1e3d",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.sourcepos.html": [
- "4742fa21220a42968dbde728378a485a9072b345",
+ "e822ab43fa7727e1a69e5b840390592c2e654303",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.sourcepos.worker.js": [
- "2780240bd883d5d7943adf007a4fc7b2ee57a468",
+ "d3525435fa17c3f27abdf0a92f27fdfae8c1cc11",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.sourcesize.html": [
- "fd1c853b88a34b12278cca3e0880861f862d3007",
+ "b99ca5876838597e9b68cc97a294bb9cab373f73",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.9arg.sourcesize.worker.js": [
- "2bb379e7ebb965be523b6d6cd88c0f85676a8042",
+ "aa15efb705921e804c6f31eda6717ce9f5ba8d5a",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.alpha.html": [
- "77134adfac58ed035c220028bffd3b576125a95c",
+ "a95f3ece7a2f4faf0909febfadb60be8a3f63304",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.alpha.worker.js": [
- "07d8d9288df7d645a2be580adaf5ada2a5c6a12d",
+ "958a2431b6d9823b2ac0a31e848d178d13f2bdf1",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.animated.poster.html": [
- "2b33b7dd2d7cf39a48046e2cd47ee2bb4918948b",
+ "eccf14bfd044c98f0c9412f7c7d18359ae645b01",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.animated.poster.worker.js": [
- "5f246feb2601492aed878d13173352c4b2fa8e56",
+ "542c9382f64572be389a06249f376ec824c31c76",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.broken.html": [
- "d9890f3057b76539da6c2824950868806fe8e72f",
+ "a2afa05f01e3d7142acbb6028b90b5ffa9ecd0a3",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.broken.worker.js": [
- "51560c443dba32d29706eb744637a4d2b5da248d",
+ "dc695b5459e0ed0a3866365777fcc083d95e404f",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.canvas.html": [
- "dc144cb6f9dccc741f04485dea6b183d85d99b6d",
+ "e5eeedea6ecf53b39791ab88c6fdbc11ef1f8d9b",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.canvas.worker.js": [
- "da01a86ba059511158aec8d37b2dda520866ca20",
+ "1f18cd77230bc2e4440ea6f7625d6fa15c3a5109",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.clip.html": [
- "994f601651d4de3e289c306b84671d9bb07978dc",
+ "a828039b7befccacab560e787c15b7e2b54bfff8",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.clip.worker.js": [
- "1a462aff68131856f58af8675b25ebb6103a7fdf",
+ "fea2a7bac70adc7f2b638f887acc884d6c20a916",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.composite.html": [
- "b4bc6f39ce9564af23e3df1b8ec185079a51df6e",
+ "b32b5a12ed982490b5a3ee5fa68c433f6673d98e",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.composite.worker.js": [
- "f6d4a5d284ae29391de3033990c1a3e45d8233d4",
+ "0b17673b6896585e67fd72cc6003faa768269ccf",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.floatsource.html": [
- "98ca580e591036c7872b335afd35dbbef014bd85",
+ "e201082e35c7c3b421c3dc288d9b6beeabd7a6fe",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.floatsource.worker.js": [
- "7206099837deca57de41cb359fa13bdb68a6aa04",
+ "1efc17d04d068d568e4e0d31609b43161b40d5a8",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativedest.html": [
- "bfe2a9c96f64593b1976d7652fc73abc9c35c3eb",
+ "3e43a772c65745b483204c904b885302d33f8348",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativedest.worker.js": [
- "aebbb34b3edd9d1efc42b1c5f0c87bbd04a04595",
+ "ce5cf5efadc021f78024440abbd52544d119c4da",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativedir.html": [
- "46c571f15398d83ecaaeb74883397f627c029c21",
+ "347b634cfd934a3c3176cfdde3cb96a05281474c",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativedir.worker.js": [
- "4bfb5433b8615a68109902f57335b352bec2f039",
+ "c82b9ba1becfcd246b4ea67c15f59fa94c79ba84",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativesource.html": [
- "4e60d7e5e91dec508528ceef585876706b8f88b9",
+ "3e18725720bef060a5f2ec0008ec27d1aeff8ed9",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.negativesource.worker.js": [
- "6d0bec1a1dbc096f79494d50be7489e826d10af3",
+ "f92d15774d78c92c7f7d6d324c338b08b4790b0d",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.nonfinite.html": [
- "dc932df3cd0283df44b3113dba13906dad657621",
+ "93dccd3d4e2c9cb87d682b40bb26490963ef521f",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.nonfinite.worker.js": [
- "7dee18058062dcf3e05cfc170ebb494ada38fee2",
+ "a56f09e0b2dd96f0db81473edd0ae44c2da76784",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.nowrap.html": [
- "fc16787978663107fb4caf942b3eb1c684949c09",
+ "1182baec3b1b1392ae654b0767979c6f9b47051f",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.nowrap.worker.js": [
- "539c6bf9772a5e244360276b6cd51cb301878586",
+ "47a77834c05065fd079b21b3b60a59fd15add75f",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.null.html": [
- "76c86b1b4afd409ebf9628f991004a6c86bf3f34",
+ "7a8338b3530b967e25c7df160b01da97f198b639",
[
null,
{}
]
],
"2d.drawImage.null.worker.js": [
- "792dc6ef41cc6535470b7caeaf113a3847e4d9e9",
+ "329abd22215b70a9ccc2005cdbe54e5768366aff",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.html",
{}
]
],
"2d.drawImage.path.html": [
- "3977880de19735d0f574fd2da763d88acad3dbf1",
+ "063353c11f32fae5a35e86d965f69bbce7b171dd",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.path.worker.js": [
- "5132aa994f1f33df1f90acfed45bbb64c65ba05a",
+ "3259ff02580062d18baa3ccdeaff09bdcf0b2074",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.self.1.html": [
- "9e1777974c59fde16c536fd95dbf4f93f8afac56",
+ "c5e51c2772682eb67cc3ee6f09c66e9183d5aaf5",
[
null,
{}
]
],
"2d.drawImage.self.1.worker.js": [
- "01d47cb334e752b7d0a5e12b07ef6eb6571a922d",
+ "a9af88d13a68cd175a77bd433b0a71e5ac64ffd5",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.html",
{}
]
],
"2d.drawImage.self.2.html": [
- "f522d4822d3000e4f00464b6313ab97151a1ffcf",
+ "ac674769663cc557ae159b59c541be0ae01b3d34",
[
null,
{}
]
],
"2d.drawImage.self.2.worker.js": [
- "61a02c87a673901c00dcbe9cec02fc4724b2fc32",
+ "802d2d8c52939afd541b2833927e9a97ed68ab88",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.html",
{}
]
],
"2d.drawImage.svg.html": [
- "d5317dd00638cb46a26e6999ff9a5561a85b1485",
+ "50aeabd286db470b6d3b696dea3f0bf51bc0e32d",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.svg.worker.js": [
- "fda62017c269d1fec944523fab69ddc6e8c4b397",
+ "a15371db39dbd31554eb3fdda2554e09f489af04",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.transform.html": [
- "bdbdb393cf8534f26464b45eb3330886c236fc0a",
+ "ca148c1a685c81c792ad74103a0dbd1d9ab6c304",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.transform.worker.js": [
- "a42f2785164b6621466f82ef0ff2d90160d79f28",
+ "4a4cd07be9555944c7d5c6b1e59abe26c8be2e3e",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.wrongtype.html": [
- "5ea4234aa1850e4e7d73324adb4be59dc70b9edc",
+ "96906e8fc37416494f1bccad8d136a3d44e75092",
[
null,
{}
]
],
"2d.drawImage.wrongtype.worker.js": [
- "9a52628c61029b23cded61fe0102d36f1f9cc721",
+ "176e418d64ace2986104361d4e5a4419d7c8334f",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.html",
{}
]
],
"2d.drawImage.zerocanvas.html": [
- "5cb758c2b9bc4683a9dd7a13ce89c71569a242f0",
+ "a30c3007307a6843a1824a1e899ed21cb25aacce",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.zerocanvas.worker.js": [
- "5f3764b15741e431bf1fa70e34b2f0dcd3695107",
+ "41346ad32888bff4f796183d6c8ef3b90e7bd16c",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.zerosource.html": [
- "bdd68d20080e98e95801f07ce616b448afa84121",
+ "0239c5356dad145264ca7b875f9f7896c1e00ad7",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.zerosource.image.html": [
- "5a0d4fcda29e36825d9e61b54dd39db52b107a52",
+ "4941d37347f4d48278dfc2cfde4aec417fdc45a6",
[
null,
- {
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.zerosource.image.worker.js": [
- "729e0e97a4cd1ec22a3e9635fbe731da7640bdd8",
+ "a3182c9b73f12b1ee5768ba89bddae6189052d36",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
],
"2d.drawImage.zerosource.worker.js": [
- "2655e3e91f51b8bcee1d16a5b61ad0510d978bdd",
+ "a80bfff5621c28b14a3d307a8bf33e40f8de8443",
[
"html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.html",
- {
- "script_metadata": [
- [
- "timeout",
- "long"
- ]
- ],
- "timeout": "long"
- }
+ {}
]
]
},
"drawing-rectangles-to-the-canvas": {
"2d.clearRect.basic.html": [
- "6975dda5bcb052bab51bcf42550d688ee6d4f25d",
+ "02a9cb37ca47746b2b34eb4880d8177db43739e1",
[
null,
{}
]
],
"2d.clearRect.basic.worker.js": [
- "5908ecca85bf8f36aaa7f4b2eab3c749dfddeea8",
+ "8f3a7e46dee11a55268b813b52a4637f07505534",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.html",
{}
]
],
"2d.clearRect.clip.html": [
- "4d67a5fadc6d9ccaafe9ee94c75e2fe2a19b27c9",
+ "2f0f1716011edaf3b56dd897ad37e960ff27ed73",
[
null,
{}
]
],
"2d.clearRect.clip.worker.js": [
- "7fb5791cc9a1525c1a9f66490a47f283c0936c00",
+ "3d3caedbb1ad1522d38addee67007a8c0b19dece",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.html",
{}
]
],
"2d.clearRect.globalalpha.html": [
- "f5c0e52c02e1d2f0a7120e67b3b2be69c28c2720",
+ "45875c52702b990861ae7de048841785a8b9b057",
[
null,
{}
]
],
"2d.clearRect.globalalpha.worker.js": [
- "885e389ba52aace6797b5cde1218a3cf443c3d28",
+ "1b07b66cb380b0418e69f69e2ba55bc6fd36cc91",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.html",
{}
]
],
"2d.clearRect.globalcomposite.html": [
- "f46245a6fd2c06a9daf9379453cbd00de3910547",
+ "b57be641ca3b2c2feb6d91f355a9e11aa91f999b",
[
null,
{}
]
],
"2d.clearRect.globalcomposite.worker.js": [
- "a31962f73e004dbfdda34593a974208095a45627",
+ "e8c1c9b27c84374bc6836d5b29cb18f4a972b49a",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.html",
{}
]
],
"2d.clearRect.negative.html": [
- "ff96d1f0782a487180499340ff858f729d001076",
+ "12126dfe87e4af45165d56a160e7733e32cd266b",
[
null,
{}
]
],
"2d.clearRect.negative.worker.js": [
- "c7390550b8ae0df942bd5dc5ba9dcb71075166dc",
+ "62846aec8e7ccffc0d448993775da4c4cccac9f0",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.html",
{}
]
],
"2d.clearRect.nonfinite.html": [
- "24aa769bdd73113853b1dd58f359b94b32991eec",
+ "332783414682c45dd420c4130b773dc8ed3f5105",
[
null,
{}
]
],
"2d.clearRect.nonfinite.worker.js": [
- "e4dc952200de34d039254e1bee06489c96fb0132",
+ "e2525df3be8d998b081d378461d7aef8176e08b2",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.html",
{}
]
],
"2d.clearRect.path.html": [
- "e9716c9e59420f2ddf65e3d65689716b7ff2bfa8",
+ "25ad954d0676dbdd85d44c9f595576fb93b2de57",
[
null,
{}
]
],
"2d.clearRect.path.worker.js": [
- "eee973df5a346477943a9a7d8fc78d8edbd5e4b4",
+ "40f51f9f0e00689c39f4f9a796caef42c86d0d92",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.html",
{}
]
],
"2d.clearRect.shadow.html": [
- "904dfe9cd9db0bd900557773edaf09ee810f82f2",
+ "3b3e41c19c6668c2a5cec4c2021b3d14077994a6",
[
null,
{}
]
],
"2d.clearRect.shadow.worker.js": [
- "74ac17c1d2fa0fae1e1922cc7e34c4f981f9946b",
+ "a1ec8ac7ae4d2339c4f84dd1c78c7180ef5c7c5b",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.html",
{}
]
],
"2d.clearRect.transform.html": [
- "a2ce63be0d71d9a8ce26cdee3c83b0d7a8643184",
+ "8208b6f657ef4c15c173ab72339685e3cf0550df",
[
null,
{}
]
],
"2d.clearRect.transform.worker.js": [
- "8b76d4e0ae9de2862b86a7439ff2b42f9b4ef1ce",
+ "f176f3da8ac6f806798606143c2f3d48ec4df0d4",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.html",
{}
]
],
"2d.clearRect.zero.html": [
- "aaebbede940268c5d28439147a04b08f34c260cd",
+ "461c318d241d574ac006f724771767729b55e615",
[
null,
{}
]
],
"2d.clearRect.zero.worker.js": [
- "24c1c4253f8e53f338546c5d09d86c3db6d2fb05",
+ "b6f42551a2e7a4e6be743ac9be98d10bbf96bb08",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.html",
{}
]
],
"2d.fillRect.basic.html": [
- "6d8e6c62f74d7dfa8f1bf14b0cf9bacf3cbf39c4",
+ "3e65472b834343be992b105c565b3dcdb23cddce",
[
null,
{}
]
],
"2d.fillRect.basic.worker.js": [
- "3a42a2a13b1b5c0c900b236fd626ea81aaa52de2",
+ "69918278e4d48996601451b72c9a7d246b7f57ce",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.html",
{}
]
],
"2d.fillRect.clip.html": [
- "5f38614713a030627d0e94f139c504e896f10ca3",
+ "3b26960e2465361dedb46843946c0301a3b5c468",
[
null,
{}
]
],
"2d.fillRect.clip.worker.js": [
- "926821ac96dc03f7068a0fad9b288f3063877ead",
+ "890b31e342f4266178a605bc864d17f7bcb8e685",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.html",
{}
]
],
"2d.fillRect.negative.html": [
- "7e59325ff3766fded513506ddac727b4075fd066",
+ "2a1942811f5411318b5d7e2b06821e26a76f22f9",
[
null,
{}
]
],
"2d.fillRect.negative.worker.js": [
- "b868dec9ff66bab72d8baa95ea0605ad6fbaab58",
+ "5df1652331a14e6fa120ffd57b6d789562f8cf52",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.html",
{}
]
],
"2d.fillRect.nonfinite.html": [
- "e5b5be1344f41cfc5ff3ea34f998da68dfd804bf",
+ "e44a9d4b78a930d9a8047c2fa0c79581f6a81fae",
[
null,
{}
]
],
"2d.fillRect.nonfinite.worker.js": [
- "418250e4bf99ee32e8ec7bee3c10b296edc2aa29",
+ "bc0170918c5c355282de1a3311f1c7591d5ab829",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.html",
{}
]
],
"2d.fillRect.path.html": [
- "2f83eec20516ef4bd015ff47e4eb6fad6c7552fe",
+ "bcf7ee5a97ab11709b21ac033bc971fbfec89fff",
[
null,
{}
]
],
"2d.fillRect.path.worker.js": [
- "0200fc568eeac3f722fad7749614dc21c91fdc72",
+ "ddbfc4a96d1a06450f199e2029fadfd72b4cfe9c",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.html",
{}
]
],
"2d.fillRect.shadow.html": [
- "f4dd0b2194be56c419fe4b2a385004077550d262",
+ "8a8e38070c679201bf92778f2d8e3b36c3130ce9",
[
null,
{}
]
],
"2d.fillRect.shadow.worker.js": [
- "dea83df9aaea1b6a2da95d7d99fad5f283b1099c",
+ "ff4ef0ca2db086c7f4bc0c5ff61cd6dcc58bf464",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.html",
{}
]
],
"2d.fillRect.transform.html": [
- "900a5a720c4456252123ca681544924e7bfb10d9",
+ "19cb6ac77a181d7f168d403fa6728e78bf22061f",
[
null,
{}
]
],
"2d.fillRect.transform.worker.js": [
- "8d0cb83c1bfd5875c04e8c9cf1f5aeece4b9c69e",
+ "a7f328955b5d1a9bdada23938d9b994fbd539a89",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.html",
{}
]
],
"2d.fillRect.zero.html": [
- "509b9b6eb494e222e107d950987dd96e093bccae",
+ "3ec78ba18a8ae0d715986da390adc293942d4806",
[
null,
{}
]
],
"2d.fillRect.zero.worker.js": [
- "48ee67ae7482d42bd0e39d4f45480ee816c0111c",
+ "a310d3ff28ab1c68017b88728c12627f029b4c88",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.html",
{}
]
],
"2d.strokeRect.basic.html": [
- "581c3884206b79f701bd32fa51718f3f43b6162f",
+ "79cc3934b4d07fd83f1c3f6670bb1c9c0586e672",
[
null,
{}
]
],
"2d.strokeRect.basic.worker.js": [
- "304fc5ba843b394b775ef8065e569642749add2f",
+ "de7b13c8f9b3d9871123b0a5ac898bba093470c8",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.html",
{}
]
],
"2d.strokeRect.clip.html": [
- "646be33af1b96a5717de5f1ba4226e5f0b4dc272",
+ "9990f2761ef126a2a99521a32e9496aa106d4c19",
[
null,
{}
]
],
"2d.strokeRect.clip.worker.js": [
- "d5a50443d3a242e6f1e3db07586e2ab0d4b0455f",
+ "f70a421f1e8845dcaad3acc1b05432a19e7b7158",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.html",
{}
]
],
"2d.strokeRect.globalalpha.html": [
- "a3e6af9b5cb3d41b47679348cca9245831426301",
+ "efc532f33f344930e0aa4dda74e95884e349be8e",
[
null,
{}
]
],
"2d.strokeRect.globalalpha.worker.js": [
- "2556f65668136f419a3fc319bab2ac06d082719b",
+ "2f938b384864e8c8179fc0e60cfdab8240452723",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.html",
{}
]
],
"2d.strokeRect.globalcomposite.html": [
- "fb4b4a199e09fdd85eadb9d77609298d7bc0be03",
+ "4532604c9a31346d8a110526d032074a9e9d78ee",
[
null,
{}
]
],
"2d.strokeRect.globalcomposite.worker.js": [
- "7c9859c7fb3a4cbf1baada913d377554e2844641",
+ "9de70c15a0c81290b91c6c4545528cc3f46c6d11",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.html",
{}
]
],
"2d.strokeRect.negative.html": [
- "3d34371f8a714561b97bf01030fbf118afc7bdec",
+ "13af38e565b403779f343f4a2b584fb468d700eb",
[
null,
{}
]
],
"2d.strokeRect.negative.worker.js": [
- "c80a44680cac581903ac498806278a2e2f9bfe27",
+ "bc2aa0434ba89c2bb39749f6a9a0ac02a73c2da6",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.html",
{}
]
],
"2d.strokeRect.nonfinite.html": [
- "808522830acf3f7e7f3849e206073947fcae3d88",
+ "63937974649c4bf966b46489cfc3535c51380b87",
[
null,
{}
]
],
"2d.strokeRect.nonfinite.worker.js": [
- "4c1bc4c609d2d1bb1f50097bdc1151d984fc83f8",
+ "1878e54c5f19483bf1b2616cd17ec13f2ccff709",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.html",
{}
]
],
"2d.strokeRect.path.html": [
- "b7a99256572a038e8cfd6ae552067a187fe495b2",
+ "da8e903f9c9149a428ea725c45196e869a1303ed",
[
null,
{}
]
],
"2d.strokeRect.path.worker.js": [
- "436bd03107d4cd8ef7b235e346e94ea6e6c52928",
+ "839b973b1717d6f74769d587f074a0a111826d74",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.html",
{}
]
],
"2d.strokeRect.shadow.html": [
- "769a6b19318bdae8e0856a8ff3248422ba25a76d",
+ "2adf24e2b56a8bc4b7c0b236d55f2375337d5e46",
[
null,
{}
]
],
"2d.strokeRect.shadow.worker.js": [
- "13beb42ff091af7bfabca363dd581f1cebefbd27",
+ "36b34550162505889d268a428628cdf230400fbd",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.html",
{}
]
],
"2d.strokeRect.transform.html": [
- "08148a5cb27bba2aa14a02e8fe3849817e4846db",
+ "214ea140234fe44be66c8e6117bdfbaabc3ca460",
[
null,
{}
]
],
"2d.strokeRect.transform.worker.js": [
- "5958cf140694a2e306a0aa63058790b963e339c8",
+ "43aab18533feefe3e4459c2e80587462b5b07ecb",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.html",
{}
]
],
"2d.strokeRect.zero.1.html": [
- "52d0964ab38982272063742e399c91eaab12344b",
+ "2c63913fca2104c501f4320f3a1e7278ebe14f74",
[
null,
{}
]
],
"2d.strokeRect.zero.1.worker.js": [
- "be3da7c88a846f47567d2c52e01069abe597c8f1",
+ "115017b3bf520be1f8cc64ebec323f09b97719f4",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.html",
{}
]
],
"2d.strokeRect.zero.2.html": [
- "42b50187daf0fbb1d02b92050ccf985f646f3bd1",
+ "16bddea7ee30d511f6957ad43fc1369a0e1800f9",
[
null,
{}
]
],
"2d.strokeRect.zero.2.worker.js": [
- "ab24ad34127f6afb269bfd78c438fe6ecb0aa9cb",
+ "973ebec44a0ddcc0253107565028b7c5be20a5d8",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.html",
{}
]
],
"2d.strokeRect.zero.3.html": [
- "b5e6bddb6fd5358c0b37e4aa03bfa92586cc099d",
+ "8bf3e043dbe4bc6760068dc627ab1a7e43d4208e",
[
null,
{}
]
],
"2d.strokeRect.zero.3.worker.js": [
- "d9b365f7e8072becdfdb48ab73c4f435099b80d5",
+ "2612e54fdb50b15a7f5bc359b06429f9fda51a9d",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.html",
{}
]
],
"2d.strokeRect.zero.4.html": [
- "a07d9370378d52438d491cba53c04e5c350e38a0",
+ "87aeaf7c135d9ed7ea90f2a08412d99b50c0cb3b",
[
null,
{}
]
],
"2d.strokeRect.zero.4.worker.js": [
- "23513a47507c926d161f5711e7583edc20f52106",
+ "3cec2063132ed84c72d22d131ead3fdcab29e33b",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.html",
{}
]
],
"2d.strokeRect.zero.5.html": [
- "363c27d680d4f0ce84e23f62cadaede1e7ae99e4",
+ "e03e7aa1182d090115fdabed5b964cc9dd6c404f",
[
null,
{}
]
],
"2d.strokeRect.zero.5.worker.js": [
- "0ef9e6772544e869b29c106d810efd4501eed65f",
+ "8591409705f044a399d88c62a45b131f4d365125",
[
"html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.html",
{}
@@ -593167,168 +594159,168 @@
},
"filters": {
"2d.filter.canvasFilterObject.blur.exceptions.tentative.html": [
- "f5332780c82b41dab06cb18d1d78990724426a50",
+ "63f23bc1f710e1210effb4acb10d3d4784dc8985",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js": [
- "61f10308801caa7e3c276aa4db4b7cf6158e4d84",
+ "9a2baad6aba1a3b821c9a1468d3fa2c25a1e3e33",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.colorMatrix.tentative.html": [
- "f3dd3037bb7ab7b9e82fbab0590d8bfe508f8f46",
+ "778d9fb2f809971c1fd965ca34dc214b8f4f2d45",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js": [
- "19d57b61e53242a4c0144b87c060dfad708bfada",
+ "ff5a6711306a81b61fe1139771bc2125ed52069c",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html": [
- "dd6fc9ee5ff1694e6a19b87a83c24ef2d32e2dbd",
+ "e91fc5502e0929870e02e63b7d4b481147637ff3",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js": [
- "79a5cd2475ca911c061b898881d2474ee556531d",
+ "0a7752bf1353662ad4d00cefb0944d1abee68851",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html": [
- "f2a9fcfd49a4a66f0a1283f41a8a5346e0a4e769",
+ "6fa1244a1db33d69641895b9bc3c7c3f0d91ff08",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js": [
- "a36fa19a5efad6948108a3cfd7c337daca1f5f76",
+ "0a72055afb7719e668f13db64852747594530f91",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html": [
- "33aae01eb056f9c37f4254b1aa4ad16c49aa267a",
+ "552402c556b7b6d55b0adfb07e98361885ff6b82",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js": [
- "7236c7087a174372a271e9c043d149faefbf6d42",
+ "861f86beb7ab406597dad732ed6ae1400112c86d",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html": [
- "23731a1286ce723473b2268dc1d1530d6af028dc",
+ "3d842ab5b44dc8c5d4ad46f76a0863092488a8ec",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js": [
- "9a4499d4d6b70114fd9225172a04cf5ac9ef8c4e",
+ "a3a8240906a3d59343e45a66a3eca51b879a60e7",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.table.tentative.html": [
- "c11e6adb9109972b1c0d2a6da7e847e2aeecc047",
+ "caef1eaef33daa0a1f1799c9852f4199d2d8eb95",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js": [
- "8ff791d3bb986733308320a158c3a8f3d17b9f08",
+ "d23534a0145405e5d34a25fd07bca2676861ecd0",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html": [
- "c4b6df8e0db0bec1dcff080436c0daba92ccdadc",
+ "fed21c695c93b5aabf8031db74e9ce128ea3a4c2",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js": [
- "f7e616e7a63fc32dc6da14acec08c4255f24ee3c",
+ "02efed9496bbdad3cc78330865a6d61ae5d844da",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html": [
- "e124341e441931b8e2f8f4c1e17d37e24a240dfb",
+ "4cd0dc8e1cbddfdcacddf46a98b73a0df6c356f4",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js": [
- "ac3f98ab235ee6236e8d939bc415b30b358ad5ab",
+ "9c30e5633aa1aacf88e9474c9838c73efc25a02c",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.tentative.html": [
- "4d80dddf0071467eabde32c85d0dd5b30da2dcbb",
+ "6b80005308d3658fdfb8523ef8f9a6d52650c0b4",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.tentative.worker.js": [
- "48c4a0448d95e596c7d46e5c38a05f33ab29efd9",
+ "8e2e794c39c82da0d413f0edd1cc7f2afd080ef4",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.html",
{}
]
],
"2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html": [
- "2ed61e66d0335be76c33a71a30cfb18d5304bf03",
+ "6392659c947a6e99712c9788d567eb58e383c615",
[
null,
{}
]
],
"2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js": [
- "1bed65ad156a78121ad52d6448dc7107995986e1",
+ "82f4ace50696da4057bce71cbe5fec6ef9891f53",
[
"html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.html",
{}
]
],
"2d.filter.value.html": [
- "2267c9aa811f00f9232edd568431fd2e8ccce426",
+ "5594174cf6e5bab70fa4ab4327e2fc56f3c86c3f",
[
null,
{}
]
],
"2d.filter.value.worker.js": [
- "01403f398c680f661ffbe7facaa4dc3049209a79",
+ "2308315b63bfe96c9cd6fab70e260cab2a7bd7d7",
[
"html/canvas/offscreen/filters/2d.filter.value.worker.html",
{}
@@ -593337,448 +594329,448 @@
},
"line-styles": {
"2d.line.cap.butt.html": [
- "d5eb4cafb6bba16875135d99cd5848252656c64f",
+ "145e145cb419e97fa6906084c8bd6ee91c042be2",
[
null,
{}
]
],
"2d.line.cap.butt.worker.js": [
- "3ad21e9da96c507cd33974000b9e34013f1272da",
+ "127393790cd7ed27da831004bfe9f40e36639ce9",
[
"html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.html",
{}
]
],
"2d.line.cap.closed.html": [
- "b26054fc162164b0075ef3d2af8161178bf20e80",
+ "edddeb08e7b3986d45137797f24ca20cc8c07fde",
[
null,
{}
]
],
"2d.line.cap.closed.worker.js": [
- "50c81519d2e7d44e7c0ee6e47bea2badb0f70c1c",
+ "b8357316e463e6d0401166069a42be5775a77b65",
[
"html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.html",
{}
]
],
"2d.line.cap.invalid.html": [
- "0570540ee393a5824ba0463e3184979b7f6c5515",
+ "2054bbc51550d4bfb28790cd60e058bbd36ee862",
[
null,
{}
]
],
"2d.line.cap.invalid.worker.js": [
- "bf933941023265afaca4c97a5d791ffb89613d22",
+ "813ceb7f669b61786542ecc2733725c04a2be996",
[
"html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.html",
{}
]
],
"2d.line.cap.open.html": [
- "54f904b43295ee6b1fc2d8735caad036492fa1dc",
+ "f26fbc686c42bcb5a8e50b0bcf1abcc70a99ee88",
[
null,
{}
]
],
"2d.line.cap.open.worker.js": [
- "ff081deb7d0773dc2ad2b344d9f8b28734080b7c",
+ "169010ac2acb322dd0284b2cf1b73d67472102e3",
[
"html/canvas/offscreen/line-styles/2d.line.cap.open.worker.html",
{}
]
],
"2d.line.cap.round.html": [
- "788675310e690e8ff4e7408d53246825d4380f0b",
+ "31f5ba5423c8f6cb88dc1682a9dddc78e73294c2",
[
null,
{}
]
],
"2d.line.cap.round.worker.js": [
- "f03579ee54ba7e4405f52b50d529da8d1a74ada6",
+ "a8d9c1b92f86e49107df3c9d7e931f8b9b2f7970",
[
"html/canvas/offscreen/line-styles/2d.line.cap.round.worker.html",
{}
]
],
"2d.line.cap.square.html": [
- "9d4a03ecad2fa6deee9e0f3a99576326f13dc0f4",
+ "0d2988877d4e584cbf365f4635f08b52eac1014b",
[
null,
{}
]
],
"2d.line.cap.square.worker.js": [
- "439f100409afeb8cb8b93ea7b68ce64df2f94dfa",
+ "6776e9891ba14b7ef4e9672d6d946f426944f3d6",
[
"html/canvas/offscreen/line-styles/2d.line.cap.square.worker.html",
{}
]
],
"2d.line.cap.valid.html": [
- "996afb37a575b581a0e94d22838e6714ce47851a",
+ "6334891f563fb38fcb15040bd0f381d3953aac64",
[
null,
{}
]
],
"2d.line.cap.valid.worker.js": [
- "52907f433eccf6c2a115a555af60cb38d1eea48f",
+ "0010fd61dda66fcf494c303ab0048bbb22911784",
[
"html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.html",
{}
]
],
"2d.line.cross.html": [
- "7c5821f2f56eaf769fc8caa0722ebeaf344b6d0e",
+ "83e2a758fd45638883d6e2eafcec948a557325b6",
[
null,
{}
]
],
"2d.line.cross.worker.js": [
- "e455aa6155dd1f693e245f9930b35ccf0ca81928",
+ "5dc95c25f132179ccf2817afa35e22edd731e6f4",
[
"html/canvas/offscreen/line-styles/2d.line.cross.worker.html",
{}
]
],
"2d.line.defaults.html": [
- "e8a39c082379c7932d9c209da8616d4ee0519c36",
+ "7f50257288c40cecf81fa409e5df9a0466c0af82",
[
null,
{}
]
],
"2d.line.defaults.worker.js": [
- "77116b44540a5c15afb080548308d192410f2320",
+ "1a59b81027e04340a3be220e1870fc5a7bb20c4f",
[
"html/canvas/offscreen/line-styles/2d.line.defaults.worker.html",
{}
]
],
"2d.line.invalid.strokestyle.html": [
- "2554d714d92a584ef78b43385b1292db31d1c891",
+ "fa67e3b3f826f559967801dfb5523dd2a0f7dfed",
[
null,
{}
]
],
"2d.line.invalid.strokestyle.worker.js": [
- "c9f2fa3d9f2a4ead65a29d9efb9b98e9a1290e81",
+ "5726b1835a49307d45095287067f00975c033a05",
[
"html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.html",
{}
]
],
"2d.line.join.bevel.html": [
- "b2325ad9891453f0abe0d4e71726959fca26c802",
+ "70e3896281d2d2e60575dddb4d69044469400824",
[
null,
{}
]
],
"2d.line.join.bevel.worker.js": [
- "87bf6a8d37c83ed5bce18d0470c86d1a7ccb8116",
+ "efd884debe1feb9f3d4a09253a0b5baf40e463f8",
[
"html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.html",
{}
]
],
"2d.line.join.closed.html": [
- "a999e73d0a851c60c9e4e7b0f51d6bd549b13658",
+ "60650adeb3f1d0df66ea1cff885e4d486e3bd90b",
[
null,
{}
]
],
"2d.line.join.closed.worker.js": [
- "cc7073fadba492825e7d66092bcf97b65903e6b9",
+ "48823119618324a02e04e204c15c548df22ade7e",
[
"html/canvas/offscreen/line-styles/2d.line.join.closed.worker.html",
{}
]
],
"2d.line.join.invalid.html": [
- "f941c69e3dcb9837757c439b885cf619b0874270",
+ "be1f7e393e6594af463e197998566697dfd2da1f",
[
null,
{}
]
],
"2d.line.join.invalid.worker.js": [
- "fa19bd70b0c3441c56d26cbe7bbc3e2ff5077f00",
+ "aa5a35c0c50f5b4ae32bcee1aa07d550ebb54420",
[
"html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.html",
{}
]
],
"2d.line.join.miter.html": [
- "e31ef139fb155176cec2d318386388fc7b0d8613",
+ "c26e883c40a0ba3e521114defc33b8a5367dd0b7",
[
null,
{}
]
],
"2d.line.join.miter.worker.js": [
- "3a3eb8f86f2803ca605e8555913a67cb84e52e7c",
+ "7b700001000e36773814330880377586cd1da9ae",
[
"html/canvas/offscreen/line-styles/2d.line.join.miter.worker.html",
{}
]
],
"2d.line.join.open.html": [
- "b6a3901a9e403242092065de7a4c1af1e57a7e2b",
+ "d801e5c367daa685fab3deddd709cd79cae410a5",
[
null,
{}
]
],
"2d.line.join.open.worker.js": [
- "5f52b6337adb6b7df37f263575ffe69ec727f977",
+ "2a1242436d4c719201796f4a82b9fda03c1da7c0",
[
"html/canvas/offscreen/line-styles/2d.line.join.open.worker.html",
{}
]
],
"2d.line.join.parallel.html": [
- "aaba8e44328fcd27998433f7dfae34039c361b62",
+ "0826406b9df5e877220bb77a8ef1ae341bc26f7b",
[
null,
{}
]
],
"2d.line.join.parallel.worker.js": [
- "d431d5e99f5ee26ec644fa0e5d8a24946b73d90a",
+ "f5b67dc5a26637bfa74d34e837aa02be520c0a88",
[
"html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.html",
{}
]
],
"2d.line.join.round.html": [
- "5f413373cb55bc5574e686a6a4ecf33558c7a790",
+ "70f6a8e51790de9a2faad452516d735e0adabd97",
[
null,
{}
]
],
"2d.line.join.round.worker.js": [
- "44a847bd30cfbf3ec905789ccf8d3005fdf1e10d",
+ "33b135d60462fb8fdd8459853e7c7d65c4c30878",
[
"html/canvas/offscreen/line-styles/2d.line.join.round.worker.html",
{}
]
],
"2d.line.join.valid.html": [
- "1ea992c70634f94af4ae983aa77ce920bec0cc49",
+ "3b3935d1f71fcf833b1c2c1b7aa99cbef36456c6",
[
null,
{}
]
],
"2d.line.join.valid.worker.js": [
- "407dbdd59e0fa3522dad0fc785909b812a3c786c",
+ "d1bdfd88456e78503213e184823db2a02a883cdf",
[
"html/canvas/offscreen/line-styles/2d.line.join.valid.worker.html",
{}
]
],
"2d.line.miter.acute.html": [
- "db8e4f84264e2ffbca941996ed51439951eeb8d4",
+ "587062ed12cc9aa73172738123d20e203da0f33f",
[
null,
{}
]
],
"2d.line.miter.acute.worker.js": [
- "95040d131943b6b8486f7b02f6cfde1fcd5ad431",
+ "0ab5c9050cd1421b1981260883c7fa205cf5324d",
[
"html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.html",
{}
]
],
"2d.line.miter.exceeded.html": [
- "828af67835c8d112c9a29a83515bfcd710944a6d",
+ "1ae5c55aef56a81564eb554ca5c1ba98ba50e365",
[
null,
{}
]
],
"2d.line.miter.exceeded.worker.js": [
- "e2b04e21f63c63fb01a0548793314ae8c4f991df",
+ "41c4716c88978903695ad795b70372f73c029f79",
[
"html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.html",
{}
]
],
"2d.line.miter.invalid.html": [
- "42d5d927d76720d4a3d509b2355c9927c746948b",
+ "eacd95b811b3ea5b0a6f29fb589d19b21d2ce5f6",
[
null,
{}
]
],
"2d.line.miter.invalid.worker.js": [
- "dbc64d52d94f9075f97fcebc848d60a83d276464",
+ "62f250670c4e52f28da8639a9b3995873b665b58",
[
"html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.html",
{}
]
],
"2d.line.miter.lineedge.html": [
- "89f4c03255486fb4737ac326d71425a5bdf38a5c",
+ "bad3cedc0ea305889802672da631b95fb155ca82",
[
null,
{}
]
],
"2d.line.miter.lineedge.worker.js": [
- "24f4fa30f5ea0f0a14849ab310b606edd7bca556",
+ "2b61bc8975b585b6ba85af72a9dec675e7f8aab7",
[
"html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.html",
{}
]
],
"2d.line.miter.obtuse.html": [
- "69acc7e7bad318d08ea59fccfa58a79e17b1d552",
+ "efab533fbabb0a364cc3b7cc2029c79adb6f7d89",
[
null,
{}
]
],
"2d.line.miter.obtuse.worker.js": [
- "45900dbc88a33d8dc1e8016b5375d1954743ac5f",
+ "42b1cd37b11aefcc4a3c366375cfd68e629a55f7",
[
"html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.html",
{}
]
],
"2d.line.miter.rightangle.html": [
- "980f8a74b8bd79bb901ad1e33c1eaa016648ad27",
+ "5bb4e63230cc628f31a7b763b8248c535b519c40",
[
null,
{}
]
],
"2d.line.miter.rightangle.worker.js": [
- "a2a07247b1e5667c4c4ea9940cbb28c884aa475d",
+ "42e995deedcbe28a31372406228743ea9bccedc0",
[
"html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.html",
{}
]
],
"2d.line.miter.valid.html": [
- "1cf07cfbb3ce480f3abc65a064bea1833a16d766",
+ "3c569ea655842abac033ded4ff66c7d04adb719a",
[
null,
{}
]
],
"2d.line.miter.valid.worker.js": [
- "c71c726f126de39180db96ecba995c9bf29affde",
+ "cb0548abd082fd4f9e729027a8ffad0ea04c7374",
[
"html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.html",
{}
]
],
"2d.line.miter.within.html": [
- "150953cf76631e6589c406cb532f147c01537dfc",
+ "da87cf4a294c28b9fde628ac9c2805a2f4bc90b4",
[
null,
{}
]
],
"2d.line.miter.within.worker.js": [
- "c09ad957e89bd39f5952488252a99b7742864188",
+ "1d9aacb817b148098071ae18d7107bde0ace1104",
[
"html/canvas/offscreen/line-styles/2d.line.miter.within.worker.html",
{}
]
],
"2d.line.union.html": [
- "69e42b7a8d3ef52efcd7dfb0964296b9c7197c85",
+ "d3d13ece092da484ab97575160a28326e9391f9c",
[
null,
{}
]
],
"2d.line.union.worker.js": [
- "02ebbfd8af01ee2a6ea492af9c3f1bee3cad6d38",
+ "f2c7b2c4cebdeb0b5747c6dc967ed7c92e3c97dc",
[
"html/canvas/offscreen/line-styles/2d.line.union.worker.html",
{}
]
],
"2d.line.width.basic.html": [
- "9b087ce8d34d479720aba1c19a7597564107102e",
+ "88e38294bfaf57084781c70efe2165d234315c20",
[
null,
{}
]
],
"2d.line.width.basic.worker.js": [
- "d066427897971977a964faa1f427402fe7d42aca",
+ "012d9b11bd7989e0bfb8dbc3af975258004104d6",
[
"html/canvas/offscreen/line-styles/2d.line.width.basic.worker.html",
{}
]
],
"2d.line.width.invalid.html": [
- "0651b3f6a5e6241cdc5aee6088e519192b5df204",
+ "481a31682296d8799f2dc34546466766c05f7c92",
[
null,
{}
]
],
"2d.line.width.invalid.worker.js": [
- "dc5e2c29263ffcea8330f4cc136c52cec754acec",
+ "3a10cb48e858fc23cbceeb41e6223dfe83376b6a",
[
"html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.html",
{}
]
],
"2d.line.width.scaledefault.html": [
- "120360607f9ad8e96732a044c648eacef02673b4",
+ "9ac77a9c49eab4fd2325ec2a384933859754dcda",
[
null,
{}
]
],
"2d.line.width.scaledefault.worker.js": [
- "a692f4cc11331236a028641bcebe5719a2fefac7",
+ "8d8089476bb62e89f73ea384af299585cdff7a12",
[
"html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.html",
{}
]
],
"2d.line.width.transformed.html": [
- "d2358ba2e84ad49dd0fd0bc11d9e1dc8812aaeec",
+ "ea8f285dc42c7260c2bbc1b334e9914942764a54",
[
null,
{}
]
],
"2d.line.width.transformed.worker.js": [
- "e26e93b1e4f93e87557bd00d59bb728db4e74744",
+ "67fc0a29bd4f224658dc7fddd96bfb884948cad8",
[
"html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.html",
{}
]
],
"2d.line.width.valid.html": [
- "4a4563c4e355eace604665156073952f22f639f9",
+ "813433da3f8a6c2cd862c58af03a5ecda1f66f41",
[
null,
{}
]
],
"2d.line.width.valid.worker.js": [
- "df6ee9838e8a808ee8390e24c5cdf7257591ecd9",
+ "195575f7de469dc7905e1531bfda2763c0cdacb5",
[
"html/canvas/offscreen/line-styles/2d.line.width.valid.worker.html",
{}
@@ -593978,1204 +594970,1232 @@
},
"path-objects": {
"2d.path.arc.angle.1.html": [
- "cf358e38fc1d3beb55d8b72d7969635780fce3f3",
+ "bdd2c7a65fe019d11be271f07ea195448306b536",
[
null,
{}
]
],
"2d.path.arc.angle.1.worker.js": [
- "5a1f54c4c2fb2ff7504e61858c9bedc92c77e265",
+ "1b6a534c23b4bb1049110cfa981c87f99c1cc0b0",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.html",
{}
]
],
"2d.path.arc.angle.2.html": [
- "9b3983fb370c1303cea9c46835e753a30e36f77f",
+ "c92e83abd7a21bdd61a1f2e83e747842433cfe9c",
[
null,
{}
]
],
"2d.path.arc.angle.2.worker.js": [
- "15bf295b2d5759c1f21f3e7f42376411bc1bada0",
+ "25598c959d64ba3e0249582b538681436d328c44",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.html",
{}
]
],
"2d.path.arc.angle.3.html": [
- "a757b31efba874479655de4dba3ec6c38db2e3f9",
+ "86170ac8c564cc0e0e90d509850c04422a082ec9",
[
null,
{}
]
],
"2d.path.arc.angle.3.worker.js": [
- "646349fb99f3c48f320079e7312f2b253e11bd1f",
+ "6841041d7847884c9c66d7be88f79fef97e2d927",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.html",
{}
]
],
"2d.path.arc.angle.4.html": [
- "b8e4d54027df3ef4b59a1206c321ae826dbe5d49",
+ "e694b99f7076340933def8db15e348104e93b6f1",
[
null,
{}
]
],
"2d.path.arc.angle.4.worker.js": [
- "8fa2ef137d7bd645e12d117a0a744b67f3b89eb7",
+ "502175165ff1fe3f6eace1eedd079d35c16a47ef",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.html",
{}
]
],
"2d.path.arc.angle.5.html": [
- "f13a2e41c964b2b4f6bafc0882dd707e16460d63",
+ "7f0d9af19f5b644c57b1d30a8a07c6ff746ed8a8",
[
null,
{}
]
],
"2d.path.arc.angle.5.worker.js": [
- "50b23cd9ba88ffaf039bc10b0a9ba65a641236aa",
+ "aa2320a92a525cae13c6f9cc9ff28b07a221055a",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.html",
{}
]
],
"2d.path.arc.angle.6.html": [
- "88184b8d77d44f29246593a27fffe39da8b4c4a3",
+ "64cf6daeef8daf03f318b1269646ea14f6a1ba41",
[
null,
{}
]
],
"2d.path.arc.angle.6.worker.js": [
- "38bd40489ba9620a2e8cdb7df34cfb343d3cfa6f",
+ "929db397d3a03b9edf2bb342d19f466d8c03f2db",
[
"html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.html",
{}
]
],
"2d.path.arc.default.html": [
- "848f20c32fa92bca95971882799a349434de3803",
+ "ee42c040852e230370df3e7757551282758e7118",
[
null,
{}
]
],
"2d.path.arc.default.worker.js": [
- "c73829a0eeee543bf2da5a085328898ed13144e6",
+ "da74713e4ab2960a19885abf88fba0fd40f5cac6",
[
"html/canvas/offscreen/path-objects/2d.path.arc.default.worker.html",
{}
]
],
"2d.path.arc.empty.html": [
- "9098b7fe02327f971a83850bc90f44f131e14c2b",
+ "25414647b21dd07d1c1f0b471ec8d5df594bfbe7",
[
null,
{}
]
],
"2d.path.arc.empty.worker.js": [
- "82281ea4b083a40986213440d77378cfca8f7bbb",
+ "9b1fbb1a387f655b9c4aed944d7d046c777d153f",
[
"html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.html",
{}
]
],
"2d.path.arc.end.html": [
- "12be27afa6620d3c7a5332fd90fcf9e3cb66ea00",
+ "b8459053f2ec41eb05b5b5dae651991552df950e",
[
null,
{}
]
],
"2d.path.arc.end.worker.js": [
- "a2519f0bad02b9d96fbd6276b628cbe4c8ad550a",
+ "963640a2735d6bc8837024a38026b530f94c27b0",
[
"html/canvas/offscreen/path-objects/2d.path.arc.end.worker.html",
{}
]
],
"2d.path.arc.negative.html": [
- "77f1b07bf5c2d11b6598aa3cd7fd5ecc1574c7ca",
+ "6c81b9e0ded88d8af55c4363adc3f81884b6b69c",
[
null,
{}
]
],
"2d.path.arc.negative.worker.js": [
- "c1abffa8e9e8f7ebf94456fd51c1cc3bdeb7b888",
+ "b48eb984742950fbfd876b2070f4706926e9d806",
[
"html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.html",
{}
]
],
"2d.path.arc.nonempty.html": [
- "542940435af00a1f995af043149a952c50c9c298",
+ "4d9ebe6d8746579c083650b1e6fe745135f09851",
[
null,
{}
]
],
"2d.path.arc.nonempty.worker.js": [
- "1d7de77486856830fb5ae78961bb23dcfe4dde11",
+ "af6b4c9853850d68fc1b7906e882b9d58d1fe960",
[
"html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.html",
{}
]
],
"2d.path.arc.nonfinite.html": [
- "c65af631b54f767af4eb9faf600532e483976b5b",
+ "b347a1e27ad4584362ce14100094acf29270dc1b",
[
null,
{}
]
],
"2d.path.arc.nonfinite.worker.js": [
- "f83dcf1080dcfbe8179a5c9544e922406b14fd07",
+ "50ff560e3497a127b1e0e5dbcbea00cc8d0abeb6",
[
"html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.html",
{}
]
],
"2d.path.arc.scale.1.html": [
- "3b0aed390f58e405345bc0a0fc240ba72ceb680f",
+ "bf8a6f1f915fbb2d4442dcf14293482715c5360d",
[
null,
{}
]
],
"2d.path.arc.scale.1.worker.js": [
- "ec300985c8a69873d8b6030d3cb6f17b7397fda1",
+ "5d9619a920f5bc23bc6b0078dc7da90796299f56",
[
"html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.html",
{}
]
],
"2d.path.arc.scale.2.html": [
- "f6822f8203fad4c81e7fdf060cb00b60a330e371",
+ "95376882cd3f47cec4e72d50d0014ed6d57fc451",
[
null,
{}
]
],
"2d.path.arc.scale.2.worker.js": [
- "d946f7f0fee991cbbd10bb1aaf087ccc99416d7f",
+ "c655dad30f881b5d7c1b04b056925b32e88677a8",
[
"html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.html",
{}
]
],
"2d.path.arc.selfintersect.1.html": [
- "9e8803a102da055720c8944017e39859e9063439",
+ "624b307af729ddb33b3ee99ced81d50f7aa6255d",
[
null,
{}
]
],
"2d.path.arc.selfintersect.1.worker.js": [
- "84cb983f1aae34330cbd0123615f36d227140ce1",
+ "6c77dbd5b19c324ea096704a090a30570f5f4ed8",
[
"html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.html",
{}
]
],
"2d.path.arc.selfintersect.2.html": [
- "f2118ef29b89df4d5fb6a57d7623a8d5face9907",
+ "b49aa2437aa9a2cd72ddac5ef645cdd306118259",
[
null,
{}
]
],
"2d.path.arc.selfintersect.2.worker.js": [
- "be7f13aee7e14032779987b5181b080d1b8bfe1c",
+ "2bbdacd46de8010e7adb802cbd806e6322e9d91e",
[
"html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.html",
{}
]
],
"2d.path.arc.shape.1.html": [
- "42242536e2bda882433dbc884ccdaf405cd96bf0",
+ "ceb3cb380cb172486e3f1672ab87683755670129",
[
null,
{}
]
],
"2d.path.arc.shape.1.worker.js": [
- "b41863bfb7b14d67fc2cc5e8d613b033510fc91f",
+ "e1058ae96dce609fabc08711ecb9773111b799ab",
[
"html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.html",
{}
]
],
"2d.path.arc.shape.2.html": [
- "1e33a0241633e89de48ce7d99f5ff27171ba0a91",
+ "a39fd03947669a464a618d40c3c5c6f3a341f311",
[
null,
{}
]
],
"2d.path.arc.shape.2.worker.js": [
- "d5d6cb7b7e3daef66f634daadecbd8db08d8a723",
+ "d444d9b04eb09c9f91b9e0f55698aadd82aa0325",
[
"html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.html",
{}
]
],
"2d.path.arc.shape.3.html": [
- "b90284e5798a1962114e271c94a37495754bf12b",
+ "853814aef215ab5d8d7f91d21c59c0a0245b9be7",
[
null,
{}
]
],
"2d.path.arc.shape.3.worker.js": [
- "5d0cf805399eeebfbc1ab0d51cc71881a798b1ea",
+ "b8008e778b08e7e979a48fd0361a9c69ae96fe7c",
[
"html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.html",
{}
]
],
"2d.path.arc.shape.4.html": [
- "dce9547a6b4e360712cc93461dea6cff2e2c7bac",
+ "e6221947dff6046b4067b1f53189245ed4115ac1",
[
null,
{}
]
],
"2d.path.arc.shape.4.worker.js": [
- "8bd028b0bd178af918c2249f9554f8ed86a93c52",
+ "9174641c20da350fa282ef0f06dbc9b5172adff3",
[
"html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.html",
{}
]
],
"2d.path.arc.shape.5.html": [
- "bd7e54af3b91ececb55412cf05d048a7bdd192cb",
+ "968a1c58c08afcdc18e9cdd50f11a5e36dbc5388",
[
null,
{}
]
],
"2d.path.arc.shape.5.worker.js": [
- "0584590afb31fa82580165a107f6833b67bfbf2a",
+ "7f40e4341abb77c394b16d1eef49e92c3e894fc5",
[
"html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.html",
{}
]
],
"2d.path.arc.twopie.1.html": [
- "ddf200c88b59724a550343762dfcced20fa952bf",
+ "ced1207a9b33ae0f2f6d0e542d16aadf9b41bf72",
[
null,
{}
]
],
"2d.path.arc.twopie.1.worker.js": [
- "c56d25c70ba13bd1dfe3837e12c93ef415d22a9f",
+ "e9abf086e0c8e8216d9882854eda08f1dab074d9",
[
"html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.html",
{}
]
],
"2d.path.arc.twopie.2.html": [
- "0a9e0c782a616afd976d0e8cdab8e88086d64b86",
+ "4948b10f2fa5271bed09fe47673c279d117401a2",
[
null,
{}
]
],
"2d.path.arc.twopie.2.worker.js": [
- "5db75de2a26897b71227e3aa6ece0f5ed3ae6337",
+ "5e9c51e5e3f48b90c348e74a34a88021ba36824f",
[
"html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.html",
{}
]
],
"2d.path.arc.twopie.3.html": [
- "df1e45480d46f105e590dead06a5659f0971c856",
+ "c4036fc06e725eca7c15a34b5301cb0c9e059dcb",
[
null,
{}
]
],
"2d.path.arc.twopie.3.worker.js": [
- "0c984884c9a9556c3688667534059b15ca4bb12e",
+ "ad72fbd0aff69fc092297a6d4b2b463388ede8db",
[
"html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.html",
{}
]
],
"2d.path.arc.twopie.4.html": [
- "8afa122c7c2031c848e7972432c224cef5dd0554",
+ "392f00e652fefd6c3bd6aa3b556a15d818c943a3",
[
null,
{}
]
],
"2d.path.arc.twopie.4.worker.js": [
- "3158528f6579cb557fe6ab649a96fd414139d263",
+ "15d799209c3c7fbd97036ced9c7af82a2c7fd2b8",
[
"html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.html",
{}
]
],
"2d.path.arc.zero.1.html": [
- "f26162f22382f0125498ce7c1715b58ce47bf6cc",
+ "5757ab3ddf706b4a1366f330eed28e86d5290dfb",
[
null,
{}
]
],
"2d.path.arc.zero.1.worker.js": [
- "efb137a92af8a0b041735db7c97b9b5c54a1eab9",
+ "5a6d35f69156b8110b71ab7a2ba590bc6f472800",
[
"html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.html",
{}
]
],
"2d.path.arc.zero.2.html": [
- "f2eda4b8a2de1b3762982fd877dfafcadeb1be52",
+ "69f8472443a075d9f9521ce521aa13412b597a37",
[
null,
{}
]
],
"2d.path.arc.zero.2.worker.js": [
- "28f4f3759afd56bff23d8d83e4cc3f20a38b2aaf",
+ "a285462fc067b96cb935783b3b28ee7fb5bf2790",
[
"html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.html",
{}
]
],
"2d.path.arc.zeroradius.html": [
- "2d56e369b893436a68f3a5af646d7ae7d5440b47",
+ "7303b7dc1c607ee73a42297f98cfb7dfc5336d22",
[
null,
{}
]
],
"2d.path.arc.zeroradius.worker.js": [
- "c57046ab94dbd4a5d714788f6c4b7812ec6dfe50",
+ "183acc1bbbb56f0fc34669fc87c7437dd11501c7",
[
"html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.html",
{}
]
],
"2d.path.arcTo.coincide.1.html": [
- "58b26356991c5e3335efc654f0aea90e9311ca5f",
+ "e7558d628fb0569f1232cd04b807c962f95a5f37",
[
null,
{}
]
],
"2d.path.arcTo.coincide.1.worker.js": [
- "44926712fcf1d803e4ec82461bafb3fee163530a",
+ "80a74c6d911a2433e3165b8b8d541dfd8f4f58a4",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.html",
{}
]
],
"2d.path.arcTo.coincide.2.html": [
- "d85e310c85268f090fe6054d41ffd931add69537",
+ "18ac31524d10b99ef9006552b2119db3a466d954",
[
null,
{}
]
],
"2d.path.arcTo.coincide.2.worker.js": [
- "c8b336a494e19861db315dacd649f9183faa8e3d",
+ "a35ffe6977a3ad6d0f06945ed2db9603777aedd9",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.html",
{}
]
],
"2d.path.arcTo.collinear.1.html": [
- "5531ca62ae093921886dfcc11df3ba73e07e98cc",
+ "b9bcc7b2380a0d4123063317ce42787d1d150b17",
[
null,
{}
]
],
"2d.path.arcTo.collinear.1.worker.js": [
- "3864a311db372520d53c04613571415e3c9b272e",
+ "a814b1af0701569c5f03acffe74f0e1b566b1d90",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.html",
{}
]
],
"2d.path.arcTo.collinear.2.html": [
- "a78d626ef0a5fe0b734f894eecc1a5ba2656072d",
+ "f51a7af206a9cf6d3f41ca715be3c248c7ba21b8",
[
null,
{}
]
],
"2d.path.arcTo.collinear.2.worker.js": [
- "6f4c2aa8c65e06be182bc5f808ab454e6a335f08",
+ "ba9a75ed4e6f32453b0924a458719de04b2944a4",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.html",
{}
]
],
"2d.path.arcTo.collinear.3.html": [
- "f2d52e424178d843960ae0ec8a473c4702d0e8b9",
+ "568d0f8f2b6f52854c26b6c1ab2f2868adf4eb4f",
[
null,
{}
]
],
"2d.path.arcTo.collinear.3.worker.js": [
- "2d152b0d83fc0f75c30de3c363b247711bc839a6",
+ "8087909cb7ce643064c96c1f593ccf46b28574b3",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.html",
{}
]
],
"2d.path.arcTo.ensuresubpath.1.html": [
- "81dc7b1bd818584e884d96684383597abbe42c38",
+ "ec1bd0399dcd6bbc360b8d85064b7764d29e4777",
[
null,
{}
]
],
"2d.path.arcTo.ensuresubpath.1.worker.js": [
- "99354ac735a89d0df6bfb7bff9bb5c162d6cbdf5",
+ "74d71b6253f0eb6ff34a5bde2f78ac6b981c3ac6",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.html",
{}
]
],
"2d.path.arcTo.ensuresubpath.2.html": [
- "43c9aec29411b6ebbcb57b8a22b13cae146121c3",
+ "60ee458524e11fd8ec7ecb38f9973034c79643d6",
[
null,
{}
]
],
"2d.path.arcTo.ensuresubpath.2.worker.js": [
- "aad3d006c992d9bef7c2746905cf7821e1d1d7fa",
+ "76790925afb87a62e205c4f645fa4cace5f008be",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.html",
{}
]
],
"2d.path.arcTo.negative.html": [
- "59cf9739777137e488cf0b65a8a6055b38937460",
+ "c35e293a6fa5380b1f6ae92176139c598d6134f6",
[
null,
{}
]
],
"2d.path.arcTo.negative.worker.js": [
- "60813e88bc35c662ed751105a8b0ed6bb08367e3",
+ "104e7a6387379509507e86518fc37378f56838b8",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.html",
{}
]
],
"2d.path.arcTo.nonfinite.html": [
- "982ad4a9648c64ea7a4963e898826f956ee63b11",
+ "9d2256d79c999e19220e648e8e119572a44da82f",
[
null,
{}
]
],
"2d.path.arcTo.nonfinite.worker.js": [
- "6aa674fc90d6f890b0094186b40fb0f2d8fe653b",
+ "1d2c913cfe42f52e16dd909b2fdaaf9b6697f8bb",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.html",
{}
]
],
"2d.path.arcTo.scale.html": [
- "7139455bda45dad99548973a6ea80c95311c5251",
+ "26dfa640ff80ec677d4b805708512d0d8c8b3b4c",
[
null,
{}
]
],
"2d.path.arcTo.scale.worker.js": [
- "b06c8f935c5cbd634cc90db89f8b6d0ff44ee3a2",
+ "dc41e6d92dda06bd5fecce812677237049da3eae",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.html",
{}
]
],
"2d.path.arcTo.shape.curve1.html": [
- "659b02ceed445dbe9ba7c38ae93dad9e7adb8e34",
+ "f7d10dd61a3602ffc3ea378b7f9d741b3a66b68f",
[
null,
{}
]
],
"2d.path.arcTo.shape.curve1.worker.js": [
- "5223b55abb29c8d9afe0f8a86588a5a0732f1531",
+ "c7e61ab5761fb30424d65c5b4fa63ccc9fd3eff4",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.html",
{}
]
],
"2d.path.arcTo.shape.curve2.html": [
- "02ab6c1437d879ccb9e7454f60f95c6fcc0e9ea2",
+ "1a023322b21d239fd8c076eae611c67b62904d2e",
[
null,
{}
]
],
"2d.path.arcTo.shape.curve2.worker.js": [
- "f06c2cdc33f2ff2192af430ff280123e1c9b61b2",
+ "f00e506f30e92071e3c3279f61cc1212d7761a24",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.html",
{}
]
],
"2d.path.arcTo.shape.end.html": [
- "0871c39157f08c06cbdc7ef5c94a349a2140865b",
+ "3f8af61215c675d06311eff7ebad5054ffdc8d3f",
[
null,
{}
]
],
"2d.path.arcTo.shape.end.worker.js": [
- "f3addb0a0c7f1f42a60539dc29aa372b9fbfdc51",
+ "20cc956a449dcf27d4db5d40753496169f1a6c98",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.html",
{}
]
],
"2d.path.arcTo.shape.start.html": [
- "5040462ada3246bd67db2ebf54e81fa1d8bb958f",
+ "a426a19d8a2f7e060fcfffe1adc841156bd21f1e",
[
null,
{}
]
],
"2d.path.arcTo.shape.start.worker.js": [
- "36706d600e2af9324a66c2b7887e405d90a3b140",
+ "cebf27a821b21871b486f13b4034b45dfa5964ad",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.html",
{}
]
],
"2d.path.arcTo.transformation.html": [
- "bea6374ea4e0a3300c1f4398c2de12282894c5b0",
+ "842210138a6f9ecb69b7015ca9b925516fe48244",
[
null,
{}
]
],
"2d.path.arcTo.transformation.worker.js": [
- "925140b675018d944fc5ccbb1bc7ede5c40b077f",
+ "585a500079f59eed7fcee0d095c44e17bb836e96",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.html",
{}
]
],
"2d.path.arcTo.zero.1.html": [
- "00541a938b6655c2bdb4fe6360dba6c8bfcbaeb6",
+ "a367385551b73eceb292426141d0b8429c1ee8c9",
[
null,
{}
]
],
"2d.path.arcTo.zero.1.worker.js": [
- "cee6d1c5baa4074d48e9ad485a0b03df66b8a7ed",
+ "8f6d979a55a7d7a24d713dc65352464fef071e5a",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.html",
{}
]
],
"2d.path.arcTo.zero.2.html": [
- "e10fe5ce95e10c7d14401aa24223d7cbee87c798",
+ "87ab4e13dea257a5f61672c64c9e96378df8a0b9",
[
null,
{}
]
],
"2d.path.arcTo.zero.2.worker.js": [
- "d0cc4a1484a70fadc2f951f2df7a4e7c8d006426",
+ "0a459763254ec0cf13fea4ac77d6cd93753226a1",
[
"html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.html",
{}
]
],
"2d.path.beginPath.html": [
- "8b9c4cdc7ac45899f2576ddab69f01d7813e5bcf",
+ "b2043d604d986a014a9b9527f2dce89fe2ed7273",
[
null,
{}
]
],
"2d.path.beginPath.worker.js": [
- "18b81afa5c4d5f2dbd3031e48b651e66e8b588db",
+ "35a4acc84d6873abed0c8b5fbbdb33516312d75b",
[
"html/canvas/offscreen/path-objects/2d.path.beginPath.worker.html",
{}
]
],
"2d.path.bezierCurveTo.basic.html": [
- "691728743228409114c0c2b92fef18387bdb93fa",
+ "099919060beac48c97ebd2fbf7729de99bcfecc4",
[
null,
{}
]
],
"2d.path.bezierCurveTo.basic.worker.js": [
- "a365372c9e67ffc195b565d37d08bdef8419f680",
+ "e7c86a08f96109d151b5b672813e0c02d7fd9e61",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.html",
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.1.html": [
- "67dd771fcbe72f4969964f2be2790e571cb041c6",
+ "6a11d1bfbb0fe7ed11e25fb410dc41a748907582",
[
null,
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.1.worker.js": [
- "beb275ba37811391f2adf3bc1db089da7f9bd58b",
+ "d6ef6f3f1b8698a9cdfa567643b421500960c417",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.html",
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.2.html": [
- "d4f99e1e2a406445dcb3cacc7bf25edf4a633b1a",
+ "d2afd19f666237b7cbbbd7f72607582f8b4acd9f",
[
null,
{}
]
],
"2d.path.bezierCurveTo.ensuresubpath.2.worker.js": [
- "7176dba0787607d08d421ab4826b24de913ef784",
+ "6860e60f4acec4b2ac83745694beb85c6bc070c4",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.html",
{}
]
],
"2d.path.bezierCurveTo.nonfinite.html": [
- "4c5abfbdc1e594afc4c3e4ea6a53d74cec953143",
+ "b49e2f43f3fa7b9370040365ecd33b86d4eeb18b",
[
null,
{}
]
],
"2d.path.bezierCurveTo.nonfinite.worker.js": [
- "752cb1b0ab8867e3840a9cd1f40560b5aebaa1ab",
+ "7eaf278f6cb490ba1bbfcbd8cb95c19f78b080e6",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.html",
{}
]
],
"2d.path.bezierCurveTo.scaled.html": [
- "2608237a6c00dc84494af88bdd7c334fc4ace6b2",
+ "10a085e9dec2eec880e4d48ace3d68fa725e6d60",
[
null,
{}
]
],
"2d.path.bezierCurveTo.scaled.worker.js": [
- "641cccf4b46a2e4f3483c0ae1073bd95c32dbe16",
+ "5098fe83eb6632cb0ac825415fb5ef0296624754",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.html",
{}
]
],
"2d.path.bezierCurveTo.shape.html": [
- "5f8f8daac2a53d2755f017faa69b698965a59958",
+ "fc6b9273e04a3217b64b148615e993b2373c16dc",
[
null,
{}
]
],
"2d.path.bezierCurveTo.shape.worker.js": [
- "ee42982f2f6eba356b8fbdb185e6309435593cb6",
+ "58f601c5d5b85b7e47b5eab1acea59cee6908084",
[
"html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.html",
{}
]
],
"2d.path.clip.basic.1.html": [
- "cca53f6be6d1546a88a420202a4bd326ff51410d",
+ "e90be3d73f0d3b9383188d7ec32e673774ad5cad",
[
null,
{}
]
],
"2d.path.clip.basic.1.worker.js": [
- "cf5a5d3b63f4ec3d9f3c6ae79cb831f4284f5f79",
+ "708608e1e00b44eebcbe4654c4a8a2183128fda5",
[
"html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.html",
{}
]
],
"2d.path.clip.basic.2.html": [
- "d5ef79bf1a13cf3d852a2b002c724cc989a1b742",
+ "6426ba2d838bace516bc5fe47e7c023f31ba6240",
[
null,
{}
]
],
"2d.path.clip.basic.2.worker.js": [
- "bad906d4b73ece1e0857f05de5a5e34b30cb0745",
+ "1ec28b6205eb7280133ce4ed87b1c3edea814f6d",
[
"html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.html",
{}
]
],
"2d.path.clip.empty.html": [
- "d74fff0d81fcca4960c2c8552138ec641d297344",
+ "30e0d6cba48f237ddfaf7ca7a1347ebe8ba53597",
[
null,
{}
]
],
"2d.path.clip.empty.worker.js": [
- "51beb6426a5a6a0454ed6d4dba5805825442bd2a",
+ "3f91a7e2e785f11a7f344d218cc68eb2ea6cc89d",
[
"html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.html",
{}
]
],
"2d.path.clip.intersect.html": [
- "3b269ce102d5574d8c5d08a98f580dd541acc992",
+ "94607f6d9269a9ee2fd34a4c08c6ca024d7681fd",
[
null,
{}
]
],
"2d.path.clip.intersect.worker.js": [
- "791c1bb78481ad33852d0770e3ece9b73044a759",
+ "8c0fcb68bd3ac5aba8323d3d4be59ab4da20c649",
[
"html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.html",
{}
]
],
"2d.path.clip.unaffected.html": [
- "a0ba94fb8a430f2fe5a294820419baa61a5a4b0a",
+ "e9b69282af90b0a33b639f484fd80e77acdbcde6",
[
null,
{}
]
],
"2d.path.clip.unaffected.worker.js": [
- "e03257021c4b758490f3d7384dee20fa4fe21e46",
+ "d65a421d33683e366a4f448029ba311eb861d86e",
[
"html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.html",
{}
]
],
"2d.path.clip.winding.1.html": [
- "9a20e493db269e40964332a45e90d334d1f0e117",
+ "2fd7c1abbf94c80c3f1482481d3da7f14ebe7d55",
[
null,
{}
]
],
"2d.path.clip.winding.1.worker.js": [
- "02565fcc8b82c4baba382fa0c16f287c1216b1b8",
+ "aa89fd55c3d31de7b1ddb97751c6cb37c28614f6",
[
"html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.html",
{}
]
],
"2d.path.clip.winding.2.html": [
- "1f223a3b38fa2acc115e5e6da2f07d0802dfbb0c",
+ "eed064f84ec5c664e9f87b8d6900d344e815a1a9",
[
null,
{}
]
],
"2d.path.clip.winding.2.worker.js": [
- "e7e8c5039def31451d04f73ee3a3a6190380e115",
+ "5c9cac6bb600eed51c78610bb733307360996e35",
[
"html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.html",
{}
]
],
"2d.path.closePath.empty.html": [
- "50ea865696cc9e28fda6b9b4ab8881d2c8ce5188",
+ "c7596a8f1ccbd13228d43d1c997f5b1f91fdd7e4",
[
null,
{}
]
],
"2d.path.closePath.empty.worker.js": [
- "c06ce48635f434d8f806dddd6d0097bc1c8421b5",
+ "c9a4030e681d2fa27094053a87a0691e6c6be64b",
[
"html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.html",
{}
]
],
"2d.path.closePath.newline.html": [
- "dca2e01b7e934b0ba2f2028bc53100758f081027",
+ "771f3d3ca089b21594b7d28dc658eb555efc939d",
[
null,
{}
]
],
"2d.path.closePath.newline.worker.js": [
- "5d27821f5511cc6ca35f156bccfddf1c069397dc",
+ "4dff932086e8853338041464663c14df00da4454",
[
"html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.html",
{}
]
],
"2d.path.closePath.nextpoint.html": [
- "4cf02d2b64417e8402fe95ede1c8611b1c1dce95",
+ "3dffdeaf5b9414d52e18de4e8ab9a5519da479a6",
[
null,
{}
]
],
"2d.path.closePath.nextpoint.worker.js": [
- "8a84ce7d83ccce1b8d8a9ab09b779ddf3e75d881",
+ "86d931b67146cc3d866015ab7bd81178ec70f99a",
[
"html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.html",
{}
]
],
+ "2d.path.ellipse.basics.html": [
+ "d664c45593102a8a8177f17d44d136223d828df3",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.ellipse.basics.worker.js": [
+ "60f3e9a67317a4fb030a14b1c9ebd5a5bd9a4a51",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.html",
+ {}
+ ]
+ ],
"2d.path.fill.closed.basic.html": [
- "72e755f7e8f0e7d799128af86bfdfa3b6a5a4772",
+ "6f8fd51de79c2bc79019b88cdaedf7430b285a83",
[
null,
{}
]
],
"2d.path.fill.closed.basic.worker.js": [
- "2c63e1ec97f1d1b66300c2cf2123afc4d8373a75",
+ "9dad73b579b80d91730727529b2de2dfc1762ea6",
[
"html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.html",
{}
]
],
"2d.path.fill.closed.unaffected.html": [
- "9d54512539870412e64e54602b070b867d7949b2",
+ "706e38d176f51f2b446ef93ef15e19ac154409a1",
[
null,
{}
]
],
"2d.path.fill.closed.unaffected.worker.js": [
- "6b4aa9244f3deb47efaccb3921b6aa8b739f6f63",
+ "b6d79828668641f1e2f400593f9c88185d84fd0f",
[
"html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.html",
{}
]
],
"2d.path.fill.overlap.html": [
- "6eaf88edcde61e5d469b6c6a03457dd225da012d",
+ "da936fab579ba191a2cc9c044d45992a93b0f0dd",
[
null,
{}
]
],
"2d.path.fill.overlap.worker.js": [
- "e1d64fe40bfa8dcb676c1f1769ce84490133c906",
+ "8f30cc7af2c73427b325f3d3bbc8b2898b0d062c",
[
"html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.html",
{}
]
],
"2d.path.fill.winding.add.html": [
- "c5f64924da313f23323507a2d08924729ab9b5f0",
+ "40845a4a7786d2b2a1d3630e9bfbb318c76c48ce",
[
null,
{}
]
],
"2d.path.fill.winding.add.worker.js": [
- "b40e1706239ddc35063b00ee3e9bedc686366815",
+ "cdbfc7f3a495c85bf3f0f2e64513eb050156c125",
[
"html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.html",
{}
]
],
"2d.path.fill.winding.subtract.1.html": [
- "4f553f2bc32375609f307f0c53c73d45df19ca5a",
+ "e0f9c838b150ef4bcdc1752e2a42ef2e770dbf66",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.1.worker.js": [
- "a820915413952806e0f85984d1b2fe7a89dc76d5",
+ "3d6a1660defe31abdee78f51d120061edcc974b7",
[
"html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.html",
{}
]
],
"2d.path.fill.winding.subtract.2.html": [
- "cf1fcaa2d44759f17e58cb0f4ba3a21e5c56f649",
+ "c7de03ae084daa02342e3b29badc2d55829e4f4e",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.2.worker.js": [
- "2c83a41ae8e21b7bffb51e9405781ebd10150605",
+ "0e8b4c79a594f87d78f56b45954b12e4c47d649c",
[
"html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.html",
{}
]
],
"2d.path.fill.winding.subtract.3.html": [
- "ffcbfe2518de25cef34b4c2b2ed771ea819cab44",
+ "3d12380357d6aff925ea8fb8d6ed8a218a6d9fb4",
[
null,
{}
]
],
"2d.path.fill.winding.subtract.3.worker.js": [
- "ca5510abf215cd7a015ee8354c2b958da8ae9593",
+ "6c9f07c76a8c26e7676fcb80f8eea1ee6affac40",
[
"html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.html",
{}
]
],
"2d.path.initial.html": [
- "35c96cdab5da97358683d2164c5a76058b4e303f",
+ "e2e02f51423a1676bc95c6fae979b75b1beeeed5",
[
null,
{}
]
],
"2d.path.initial.worker.js": [
- "de8597fbc3c50674defe7d66b187d719692ad0e0",
+ "de1a93503290970d1b5a902b16b8e476529680ee",
[
"html/canvas/offscreen/path-objects/2d.path.initial.worker.html",
{}
]
],
"2d.path.isPointInPath.arc.html": [
- "fe12f9457af15a194f30605bf8ed888f17b2f60e",
+ "ccffcd7d76c3409312d7603b6e43655df1fe22a4",
[
null,
{}
]
],
"2d.path.isPointInPath.arc.worker.js": [
- "2803e3932567002ae27a86115fe8adaff9832c6a",
+ "13510b744f5786ad44f72c60ee88238be5f1f0f0",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.html",
{}
]
],
"2d.path.isPointInPath.basic.1.html": [
- "3cd24f548750509c8bd91009b7a5217513174912",
+ "7b9673a81200401f28d587632b5c580aef7ff00c",
[
null,
{}
]
],
"2d.path.isPointInPath.basic.1.worker.js": [
- "93dd86a5f799b474273f5fd491741a18c2b99ed6",
+ "f51900ea6bf80bb7790d0408da124264799ea7a7",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.html",
{}
]
],
"2d.path.isPointInPath.basic.2.html": [
- "42381d3f552f0e9f0df1ec993d7ba47de6605758",
+ "3710dd185d94fdea0d94c4099180858115cbe6c1",
[
null,
{}
]
],
"2d.path.isPointInPath.basic.2.worker.js": [
- "7dbc5fc6fb2fa513caf5a180df6e8591b7b44c2b",
+ "6024a0dc390dc68e3d50a12d9c5435537cc8d963",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.html",
{}
]
],
+ "2d.path.isPointInPath.basic.html": [
+ "21cf448de2134d287803262696aae4a43703377c",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.isPointInPath.basic.worker.js": [
+ "3e2a95c15e5a236ff575971a2d63bfcf53cfe9a2",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.html",
+ {}
+ ]
+ ],
"2d.path.isPointInPath.bezier.html": [
- "f336fe4c7f63fb815c54855920d7e8b9a053554e",
+ "d348110305ef521a00c7b2210a34d9c50a8751d8",
[
null,
{}
]
],
"2d.path.isPointInPath.bezier.worker.js": [
- "6017efc286e2356ca117d4640125259008848d5a",
+ "894fe5da31427a88ad06377a34fc0223c32e506c",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.html",
{}
]
],
"2d.path.isPointInPath.bigarc.html": [
- "2e6e78fedb0c4e0088c1b2b0c19a332a34e7aafb",
+ "fcb4ca88273fecdb0498697a639a1e4279f8dda5",
[
null,
{}
]
],
"2d.path.isPointInPath.bigarc.worker.js": [
- "1ee00102152a5be1b49e8ac2e9f9cec5a8cf3378",
+ "40233790c810a164533d881ba7dce0f327c349e8",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.html",
{}
]
],
"2d.path.isPointInPath.edge.html": [
- "bcd4eaefd9f32c2b756972772acf4fbde1d7399a",
+ "aa367b4e56cf28856f0b8eabd3d3803b2f08a82e",
[
null,
{}
]
],
"2d.path.isPointInPath.edge.worker.js": [
- "21222ebc4fbe15d4becbe86630e0975f16e06ba1",
+ "3918a6fe83d6bae4b6f709284079d8916670c685",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.html",
{}
]
],
"2d.path.isPointInPath.empty.html": [
- "9a875097b021c3de4b196a050503c82988c25d6e",
+ "d2ebf1e7e1b282e36ee0f418c51d76f160c8eaed",
[
null,
{}
]
],
"2d.path.isPointInPath.empty.worker.js": [
- "e449ee2e69b29d89b2caf2f6f100750988e946d8",
+ "319836dcb583dd23c5429ea90a3ddd19dcc928a3",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.html",
{}
]
],
"2d.path.isPointInPath.nonfinite.html": [
- "8dc4c1df3a0bd7ed4b418f7b1e32d8539a7235fa",
+ "ef12d057ed54c486ce1382b19b9a9571cdd27c33",
[
null,
{}
]
],
"2d.path.isPointInPath.nonfinite.worker.js": [
- "70a4ece16213cf6bb84fc4384ac692ecd4a9172b",
+ "dfa6eec766cbf28377d23d7c42fdda54ea46ced9",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.html",
{}
]
],
"2d.path.isPointInPath.outside.html": [
- "d1a1d86a02c980ca04eae57a0aa99f8d904383e9",
+ "ce2ab819dd83e549c214bb9e293f93059a5cae68",
[
null,
{}
]
],
"2d.path.isPointInPath.outside.worker.js": [
- "6d0710504695901a346ef52ada4cb3ac0448a7c7",
+ "d4db12ef379aa1426357394ba907d64166b7e725",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.html",
{}
]
],
"2d.path.isPointInPath.subpath.html": [
- "b0ea1f9a0f1b79767824c5dcd4c20f5b7ce9a0e8",
+ "c4abd9276460d4dedb9fb2a43be05db0e746e57a",
[
null,
{}
]
],
"2d.path.isPointInPath.subpath.worker.js": [
- "4a82fcc08a16bb4d9937b174f5e021570f4070cb",
+ "82df3b7c70aa167c224106f7f2f477ba47f3c2b1",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.html",
{}
]
],
"2d.path.isPointInPath.transform.1.html": [
- "9b7b2e5ee0f6a9a20b47a6b84bad25fe7f938c99",
+ "bccaa842e5257224330bdb834f9f066ba5b10f13",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.1.worker.js": [
- "2fafbe910e9733647ba403d2f1b3480181cea14f",
+ "0774fd0d62d6c5e656118a55bb67c15cf56fb9db",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.html",
{}
]
],
"2d.path.isPointInPath.transform.2.html": [
- "45b884f2b5c1469f8a67ff4e7e45b949aaf84529",
+ "1e587c1d8a8503dce7182032948cf2a083ff13e6",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.2.worker.js": [
- "3f37e62057e3991b45cf4dbec8b81d96899a8129",
+ "ff4c42c450cb284d3e06f1b242b0454ae6e3dc59",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.html",
{}
]
],
"2d.path.isPointInPath.transform.3.html": [
- "923da480e8aa8178ee818962b3eaad5137d006cb",
+ "826d7e23c985e16f2836fad3467354f81be25ac4",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.3.worker.js": [
- "172d0a72a4e0fd939732de02e1dd6d224a80592f",
+ "f6750e910906cfd543219606a5ce0b2402bcd157",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.html",
{}
]
],
"2d.path.isPointInPath.transform.4.html": [
- "0f87cc2b212dba812d28683c2501f663ddf11f25",
+ "97792d688937c5b2d36152552887bb1e15ca6afa",
[
null,
{}
]
],
"2d.path.isPointInPath.transform.4.worker.js": [
- "993148110a59df8739d9260d5ec43d7667b9611b",
+ "f43a8a3d1ef47a9374bc09a8c99351ec88e4adae",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.html",
{}
]
],
"2d.path.isPointInPath.unclosed.html": [
- "098370f0f7d8f96e5baf760c7e3298b67a779bc6",
+ "3920c7de4b53f76b6e21e9d6fc03233733fdc9f4",
[
null,
{}
]
],
"2d.path.isPointInPath.unclosed.worker.js": [
- "ad4ac8781bc1d5a7dde7e99b8785a44f030a8287",
+ "7b5ffc4a795c4a6f885d7c286c21e1323d5336a7",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.html",
{}
]
],
"2d.path.isPointInPath.winding.html": [
- "9698017e4fe106b40ab6a4eced4a878114351bda",
+ "b2741a5069f1a43615003cae6247b37515af5554",
[
null,
{}
]
],
"2d.path.isPointInPath.winding.worker.js": [
- "6ef758114a0e9cfb80b0ef4a9e68481e6923eb97",
+ "094bc05910db5be3885c9f7a882b9093b60f1603",
[
"html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.html",
{}
@@ -595195,1373 +596215,1485 @@
{}
]
],
+ "2d.path.isPointInStroke.scaleddashes.html": [
+ "1ed13b32de6ad75726dc7f662fe987afe350155d",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.isPointInStroke.scaleddashes.worker.js": [
+ "240905308e3c34927158b82f670421f632ae2e54",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.html",
+ {}
+ ]
+ ],
+ "2d.path.isPointInpath.invalid.html": [
+ "0b4c635fc86df5e314902ff9904376bd41033198",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.isPointInpath.invalid.worker.js": [
+ "f09eeb75264c0fca5ce082e03142b8d661377573",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.html",
+ {}
+ ]
+ ],
+ "2d.path.isPointInpath.multi.path.html": [
+ "945855231b7dc07fd24d253c61796aabb0120200",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.isPointInpath.multi.path.worker.js": [
+ "d3d4e60747b7cb29ac1661000f401f2ccd2cd187",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.html",
+ {}
+ ]
+ ],
"2d.path.lineTo.basic.html": [
- "3247ededcc872686c0881594d7b4c9327d5e82aa",
+ "e0bc64617f9ccb13d3d26d8405d5615cd60469a8",
[
null,
{}
]
],
"2d.path.lineTo.basic.worker.js": [
- "980de5c1b286b8b9fde4ce2ce8ed4345b2a9c78d",
+ "6e02a1f149c73dd2a7ee192c528ef5fa5cfe8c28",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.html",
{}
]
],
"2d.path.lineTo.ensuresubpath.1.html": [
- "5a15f9ece489e918cbd43b3e127e478845a8fc64",
+ "2561a2f5559f1b1112f40845ff595a20c91ac3ab",
[
null,
{}
]
],
"2d.path.lineTo.ensuresubpath.1.worker.js": [
- "024754ca0ea07155bdce67e70dc1472a62dd1f86",
+ "ae4d85735ec2ca205fe8df429005f47134929eda",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.html",
{}
]
],
"2d.path.lineTo.ensuresubpath.2.html": [
- "eaad8dabcceda6ed9ebe1b8e33430dbcc2b6bf7b",
+ "9ca14a13935e4a5799ee396a201a8f68a710872d",
[
null,
{}
]
],
"2d.path.lineTo.ensuresubpath.2.worker.js": [
- "2a15c9e14d4f3c7eb1af219ef25a56ea2905d738",
+ "b6af21235f435edfa4e5e74ecfaec0db87c1cddd",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.html",
{}
]
],
"2d.path.lineTo.nextpoint.html": [
- "fc697b9be59ba0426d91c1f0d2ae79261a4c2067",
+ "a649d3a86dab448d7a08914eb50c48b39d97b72d",
[
null,
{}
]
],
"2d.path.lineTo.nextpoint.worker.js": [
- "de9d56be06e71c5c07a31d3f50dce1ea0668eee2",
+ "9e4e24a06de12ec6bdb0875c1ae8f11fa883dd8c",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.html",
{}
]
],
"2d.path.lineTo.nonfinite.details.html": [
- "82270be5344220b2a65add6ef442db519e7b4279",
+ "35bc80d33694ed0686e3e77d018fb6561867c573",
[
null,
{}
]
],
"2d.path.lineTo.nonfinite.details.worker.js": [
- "bf74ee5b504377c3c514f81b86eacc69803cfc13",
+ "5052c74b94f2542f02b272345047c4b2dfa61a33",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.html",
{}
]
],
"2d.path.lineTo.nonfinite.html": [
- "02d77163fd27f59133bbf62c0f31502fab1dc752",
+ "5a144dd7f614d9e0a9601912de387a42c2744f63",
[
null,
{}
]
],
"2d.path.lineTo.nonfinite.worker.js": [
- "5161b4e43229758d61c405be7b40304ec00e2a49",
+ "82921b7cd9a5aee64304f8c00ab8a34fe31e8147",
[
"html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.html",
{}
]
],
"2d.path.moveTo.basic.html": [
- "8363792c7067c02f3ee7c4f418753243392e725a",
+ "f9777c6ca8fd871eeed849ce48509404b4d489a4",
[
null,
{}
]
],
"2d.path.moveTo.basic.worker.js": [
- "eca39660bceea999729a6a09adf3184688121be6",
+ "0b1df374b67722ed6b77a71d9dee169635c14f30",
[
"html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.html",
{}
]
],
"2d.path.moveTo.multiple.html": [
- "928c9783d447c17f1afed702157ad28f2c81a051",
+ "0b56cbbfef3b3a808a81ed019539d3d3ba900051",
[
null,
{}
]
],
"2d.path.moveTo.multiple.worker.js": [
- "686f5ae84ad82a27d64d3495e77f6b4bdc21709a",
+ "9f49ea8a1ba88cb1eb913a8053c43fc115c12a86",
[
"html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.html",
{}
]
],
"2d.path.moveTo.newsubpath.html": [
- "89fda23ffc90c7d24844343d306caf1372a7e82f",
+ "c2594c006edfb2818ecae748cb867078f04a4fe6",
[
null,
{}
]
],
"2d.path.moveTo.newsubpath.worker.js": [
- "d00491c42bfe1d65783e90316f65f028d8333f3d",
+ "e3c9c8529d225f3e61871d4880c3d53fd19a0385",
[
"html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.html",
{}
]
],
"2d.path.moveTo.nonfinite.html": [
- "1a2e6cfe83977c485fc54fa2936c67c72151bc27",
+ "ea3eb34c767d8a6a08f8dbc825806efa60536829",
[
null,
{}
]
],
"2d.path.moveTo.nonfinite.worker.js": [
- "ced534fb9543e67567798044a1f31212571e368c",
+ "97e2bd72e34f7ef11634b9eebacf7aff12c9a1f6",
[
"html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.basic.html": [
- "46a83e112c507b030cfdc264e45cb9127235cfaa",
+ "4d14ce5585b12970ed1c814660fcf79127abebef",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.basic.worker.js": [
- "a1dfa045d94486a04de4e0134cc0ed21619f7317",
+ "161e5f1a65f928de17c875170661469554824a46",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.1.html": [
- "37662e46185236496a6a85b3a0010473c215d6d3",
+ "3e916f00c7d1c41a202be289021670a7e72fbf68",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.1.worker.js": [
- "fe20e7b890fb99c0f5ff1af90d46b768a52882da",
+ "95dcf2bed1ccf38120f519459c51c7e47d04081b",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.2.html": [
- "2f18424749f100ee7ad65033c47c5a2b77ba5e49",
+ "2fb05a265827aa7425127d6bd768506c2263e67a",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.ensuresubpath.2.worker.js": [
- "f840168f986c2fe693f4d5e90933f982f8d52e74",
+ "4beaf9dae2b0c0bf09f0058f1cbfaf52fd9e92d7",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.nonfinite.html": [
- "1083f027e2c664029660c250402049ca83461fd8",
+ "ee4f333a08ad98bee9d787e29cca88347ffb6d81",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.nonfinite.worker.js": [
- "df17bd6d3627cfabe8765142207bd30dfcedf996",
+ "a61eb9a8cad1eada4936cb149c3618dd0dd16865",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.scaled.html": [
- "60ba483f14d2f77071f8370f24257f5ca1f9f7da",
+ "92c9377d6f6ea634411ed6bbff1fd544ea85e5be",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.scaled.worker.js": [
- "298001b212e08c67d3508feb4b347e3221d41699",
+ "04fd6e904d7ce0ea12a52a70f481d638006ce978",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.html",
{}
]
],
"2d.path.quadraticCurveTo.shape.html": [
- "21cb175d598881728a7402243c59d36998e67767",
+ "ea42d669cb5d65197bbaa7cf3289a197bca9de4d",
[
null,
{}
]
],
"2d.path.quadraticCurveTo.shape.worker.js": [
- "f7aac9135afa3b2e62c0d49f2880b85838876598",
+ "9f2afea09d24e7f7aa3722e9a25f11f94a2b3da0",
[
"html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.html",
{}
]
],
"2d.path.rect.basic.html": [
- "5214bd8dc059bcbfaf5b6d30f1cef01bfd2dde13",
+ "e8d874709d8c995805dba7a21f1944abfaa0e4d1",
[
null,
{}
]
],
"2d.path.rect.basic.worker.js": [
- "dcf3dc2a4bcffb335c4a01f4b486d0f9b7cb4b41",
+ "c8eb3838f9dda1d46acdfa9c16b1aaf395dbd522",
[
"html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.html",
{}
]
],
"2d.path.rect.closed.html": [
- "70db3725a1140394eec244d45fb53aef27ed23ac",
+ "6f6187439044f63ad409e6ec558853f6956881e4",
[
null,
{}
]
],
"2d.path.rect.closed.worker.js": [
- "6ee09ef8d4379c0b18daf473ced695b6004abe6f",
+ "f40868730b3c97c5fb269ac6845fe89f26fed939",
[
"html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.html",
{}
]
],
"2d.path.rect.end.1.html": [
- "bb4bfc0c9065b8a5f70e29216cda973f4644e6b6",
+ "e4d5ece132b48b7bdcbca32d6c831f4d56d0f4e7",
[
null,
{}
]
],
"2d.path.rect.end.1.worker.js": [
- "f576ac436642ffd2e2abfcf16fb137f0aff899b3",
+ "fcf9d0526f9fe5dd82c5cde68bf562b32e435e26",
[
"html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.html",
{}
]
],
"2d.path.rect.end.2.html": [
- "1f945a858e9c46272edae786d6a6eb61f42aa8f3",
+ "d6bad78abb6952a039c9e33ad228d761bb3198cb",
[
null,
{}
]
],
"2d.path.rect.end.2.worker.js": [
- "8813ed81522a888c947f963eb58c6b4561cbcbee",
+ "84c1b71d71d49f456809ab50fc482abe48d2768f",
[
"html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.html",
{}
]
],
"2d.path.rect.negative.html": [
- "8c9effe2a546e351f8341f87f925febce40bdc5f",
+ "730e2e887a7acc0fa8204a161d093fc136df3547",
[
null,
{}
]
],
"2d.path.rect.negative.worker.js": [
- "ea01c6d3f07eae1750131520684ce75d3afa78ab",
+ "44449e85e2c97b3edd506301d3c243f7dc764a3e",
[
"html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.html",
{}
]
],
"2d.path.rect.newsubpath.html": [
- "1dcfbe94869d5e6d2198cda8a917e84ee6f2a237",
+ "05b972e045dcf44733a9e9d79d8345fdc48c1cb8",
[
null,
{}
]
],
"2d.path.rect.newsubpath.worker.js": [
- "44962c5f2f47e98eda3b91d79189bc3be719e8a5",
+ "bdf4a926c1ff4a9fd62165b32cb5c941f3275cee",
[
"html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.html",
{}
]
],
"2d.path.rect.nonfinite.html": [
- "7f92cf5e48cb4bda3063f535195381ac3b573c7d",
+ "16d76aaf185d00b1d84e03d5b99d7132dd02fbbe",
[
null,
{}
]
],
"2d.path.rect.nonfinite.worker.js": [
- "6fa1e82ae482e9b3b8d9440f9f3db927d0fc23d6",
+ "307a5ec08f71fe83a28dd4d617877054da5f10ba",
[
"html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.html",
{}
]
],
"2d.path.rect.selfintersect.html": [
- "36c3f074194ed92ccb96d9e703dd78032cf4131a",
+ "af97fa6d38cf7fa823972aa230b44cd51345ec09",
[
null,
{}
]
],
"2d.path.rect.selfintersect.worker.js": [
- "84c2687f309350ff31b1ddcb46008b1c7e9f4634",
+ "495d016e80ceb81fb549f02108acd94978bb5dcc",
[
"html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.html",
{}
]
],
"2d.path.rect.winding.html": [
- "c4f4128188baff61e4456a42a8dc7d229c13f38c",
+ "a7f79c5223a09c82ac694d073eb980cd50825736",
[
null,
{}
]
],
"2d.path.rect.winding.worker.js": [
- "90a3d05e8b21c58915b36f6a43d3b0889a574358",
+ "45ff0427e1cb53147f908d4a60c5fb3ea1363434",
[
"html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.html",
{}
]
],
"2d.path.rect.zero.1.html": [
- "90c0bb1f68a71e1959dc04cb537f0852b7ebd8d1",
+ "45dac2079d3f93700530e01b6e354ce3ecf6795c",
[
null,
{}
]
],
"2d.path.rect.zero.1.worker.js": [
- "4d080710d070bd8149b5521202f7b0c691cd072a",
+ "de6fb58c8a3e0302da2f944a54dca6275e7a07b9",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.html",
{}
]
],
"2d.path.rect.zero.2.html": [
- "4c3ae6f6ddfe8f828c06da68471ba8b6682b30ad",
+ "0386ea06e70db94d568af23c2b0a7239e2b87813",
[
null,
{}
]
],
"2d.path.rect.zero.2.worker.js": [
- "93d5a52875969291aa49cecc42343c6420dd7ce8",
+ "8e323d2dd08a4546c62cef9c412c72c97d4dc130",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.html",
{}
]
],
"2d.path.rect.zero.3.html": [
- "86bd7494186b075f7e8438a91892ecbb2dcdadc7",
+ "12990409293aafe8380af4abef33bdc179ab78d9",
[
null,
{}
]
],
"2d.path.rect.zero.3.worker.js": [
- "6403de43c03ca076f5fac03dcc2aed1e468dff8c",
+ "5e6f490c73e18b5e1cd7afb0dd6ab762f9c717ff",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.html",
{}
]
],
"2d.path.rect.zero.4.html": [
- "063ef2ba1d5543c6a3d41cf8e42ae055ccc5d4a9",
+ "93da1300de3906c699a7be2ca731f8b9123fa99f",
[
null,
{}
]
],
"2d.path.rect.zero.4.worker.js": [
- "87fd69856630e6a241adb078732ca4c3c5ce1c4b",
+ "e19da3b9177c9125bf17fe4a4255c440a6f28d72",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.html",
{}
]
],
"2d.path.rect.zero.5.html": [
- "0fa0b0755043613a09cb4ba66b3b1517045864fa",
+ "45a7f03813f88a91578a04f8ac1feadad0c3f816",
[
null,
{}
]
],
"2d.path.rect.zero.5.worker.js": [
- "77851f54d3ecc1a85b26541bae286e94f3cd1876",
+ "d39a7415738f6852e9bbd65694e4fcbda1e0d561",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.html",
{}
]
],
"2d.path.rect.zero.6.html": [
- "a3cf7b60ac7f3339371d08a932ce7b829dec6a39",
+ "ac74e206608a0d8799834932c4de0f7ff54d353b",
[
null,
{}
]
],
"2d.path.rect.zero.6.worker.js": [
- "5db284837c4f6b8d5df023737c8e38c32b6683eb",
+ "a567359c30ab245659cd247b65e01efc11f34389",
[
"html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.html",
{}
]
],
"2d.path.roundrect.1.radius.dompoint.html": [
- "479ab00cd7df37738c0ffe670431c6ebd8395722",
+ "f7e80a0119f8f81171d30bf969d56d0c4eebfeef",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.roundrect.1.radius.dompoint.single argument.html": [
+ "4ea78c32d12bec16a76b08666b6fdf742f9253c7",
[
null,
{}
]
],
+ "2d.path.roundrect.1.radius.dompoint.single argument.worker.js": [
+ "b93d88e89cdc16751d4afab322e383c22b2b83ca",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.html",
+ {}
+ ]
+ ],
"2d.path.roundrect.1.radius.dompoint.worker.js": [
- "ba4fb4e611fce50e4a995fe5b24a77532f4d33a6",
+ "06d787437e77c440e10dc364ac95a6828b0217b7",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.1.radius.dompointinit.html": [
- "18ff259e66cdda04ea2e42ebb7bc4444b1026709",
+ "97084a446fd18d0bb8282a2755d86fd4fe45ad23",
[
null,
{}
]
],
+ "2d.path.roundrect.1.radius.dompointinit.single.argument.html": [
+ "10c5c14cff003e9312bc2d4f2e7f0850bfa025f2",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js": [
+ "a62370677beb87ebb0a65527ae7c4993276b35ae",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.html",
+ {}
+ ]
+ ],
"2d.path.roundrect.1.radius.dompointinit.worker.js": [
- "589950c04e077b0ec7152d14f2f40f093308c8ea",
+ "56c8e1fcef51b2c861956f60585cda1669a56c17",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.1.radius.double.html": [
- "4761bb5e5e8693b67921c2c4386079c9f207a902",
+ "33574eeaa0ea7f1a9fe280df73de4386a81930d1",
[
null,
{}
]
],
+ "2d.path.roundrect.1.radius.double.single.argument.html": [
+ "b2c826ff386c89e9cd14497d40b666ffbcd6c9d3",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.roundrect.1.radius.double.single.argument.worker.js": [
+ "04350e81aac17d98c918cd5c7e90d6633b681011",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.html",
+ {}
+ ]
+ ],
"2d.path.roundrect.1.radius.double.worker.js": [
- "57f28c77786c46ed867ca9c924ce9605e0e38bac",
+ "ef9da08d618a3149b34420b12026080e7b71f525",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.1.dompoint.html": [
- "c96ed08f05c6e387f9c1e394a87b26bf0817cdd9",
+ "7f67c42ed48df2bb8bb75d0f2af849289209bdea",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.dompoint.worker.js": [
- "7e7a4efddc0ced8d67a5e6ee3b3a2c86905db43d",
+ "5d0387d0d1f55fb66601d7e103ca0e97fa2c599a",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.1.dompointinit.html": [
- "02b889c7592f75a05f078b7852f402e76a4d08cc",
+ "2ac0347d96bf23369243c91e112939630d3b651e",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.dompointinit.worker.js": [
- "fcc3cb088ae197a54a9932080ef64ebf89c97ed8",
+ "240a36e846a4ab186416365ce9792d77a150fc4f",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.1.double.html": [
- "2a6a030237bd249b578ab15acdbbdced4070c997",
+ "791e59ee7e059ba93b3576a3ac38aae403537a59",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.1.double.worker.js": [
- "6d4d029b1c8903f2c75462298dd0880532b76ab3",
+ "0fc351c3d629cbb346a7130fe7a433aa9e12ffa6",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.2.dompoint.html": [
- "bc6e27c6830f46c4d8684ddab40fe17dc7ffc0f1",
+ "d0b085e1703e0e0abf9acc3e09d20d57beba260e",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.dompoint.worker.js": [
- "fead59e863ba9686e6bec03d17daa137f501cfeb",
+ "4c6bb06bdb72e7813dfee8253f3945c3d3cae62a",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.2.dompointinit.html": [
- "fcca1c739fcf93c305d83e0a18e397ad4bde877c",
+ "380dd269978b341226a9cd45954f94893557cfb5",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.dompointinit.worker.js": [
- "ab334e4ca06a36c52a466bb09eb9f7e0ce37a585",
+ "e8cdd2c0153484c612e92e1df685b4bbbf268875",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.2.radii.2.double.html": [
- "2bc67375669dbc386f33db9ae0c23ccd377889a5",
+ "b7b25727b9e642fe04f087d6354b04fc5e0a9373",
[
null,
{}
]
],
"2d.path.roundrect.2.radii.2.double.worker.js": [
- "d355852a5ce17e47ebb8caa73f38a6cab0e39ca8",
+ "756328682dfa29ba3d7575451cc15e46b9598ae1",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.1.dompoint.html": [
- "f3388e6562e19b31a39403b5bdfea8829baa6a4c",
+ "b7f3e53261ad13a36000426112fa3ce11e14391f",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.dompoint.worker.js": [
- "36c6401bf3d516e29dfd86caf1c83ac590ed4dfa",
+ "9ac4d731c3aa90b9a4960e25e1fb093a5ebf2bba",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.1.dompointinit.html": [
- "dd96e859ea1bd932d39a8727a1731e0fbea76064",
+ "93f89159b1da776fae8f5d0c3f43e03a2feaec67",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.dompointinit.worker.js": [
- "a497d5788baaaf15092595e105b925227ca9cd23",
+ "9d00729ce9e3db1ad9afb8fe2c340de67e3a6605",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.1.double.html": [
- "4c5f57122cd8b74e2a2f1c691187a13c73306688",
+ "976458bc5f072fd5a2c236eeff7e9110588dc0e0",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.1.double.worker.js": [
- "171a2ae5e6f6f9dbda76f75f67a7c2ca16b1136f",
+ "c4e1c4fc039818cfd357aa1d9156f049d03094f0",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.2.dompoint.html": [
- "3459ac27bb2f454d56368270aec905b693937134",
+ "1a89c28d15fc531272cc4622bc3e3a08691804e6",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.dompoint.worker.js": [
- "9588780f978dc0d1e5019d163577502ac20f31ab",
+ "4e4df3a6013f9fcf4eae37707df0c38bba19a936",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.2.dompointinit.html": [
- "6476be489f78dfa4d4e642ebd6778dbc1bc11037",
+ "82ceb6a7bccd0ed2b4109ded2f55706321427216",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.dompointinit.worker.js": [
- "42dead8509b7c840db9ea91d1139a04fff0c67a3",
+ "1333e2386d78d4685e9241befec430fa73d48bd8",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.2.double.html": [
- "652745e0bed6036769074f8f9b4db15ba3e7d3b9",
+ "b466956d580aae1b78f21d1c93ff6225677c3b3b",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.2.double.worker.js": [
- "e3929fbfdbb4b31ab09e61c0e5e9091084d17a11",
+ "027dbae52acc5bd516fb47d34543a7e1de84943e",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.3.dompoint.html": [
- "1c295143c814f4f5690feab1003a4ca42576cfe3",
+ "897aeb2685ff4a7347650f29ada2c17f3f82002c",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.dompoint.worker.js": [
- "c8e08ec297f1439ad142101115460dacada6dfb4",
+ "8a80623fc9ac271c26728926265a9ee16e81eae1",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.3.dompointinit.html": [
- "f8e62a5bf625a8f9af31832b53328aa9fc71d74e",
+ "e1e055cb6439c501c259085ed8d0f8285c11b596",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.dompointinit.worker.js": [
- "0fe2b89877a1641555e755599cd137df1ce20d7c",
+ "d3b188dd7f545c3f1841bbffb445bc25a292c79a",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.3.radii.3.double.html": [
- "ff1301d9cd4308577dc961d8da9b353b349c0bbb",
+ "a0e0553364fa48bafa4d0d5699d8749cd5f29f22",
[
null,
{}
]
],
"2d.path.roundrect.3.radii.3.double.worker.js": [
- "2422435d5264920601be37092d5f4c2f2117bbab",
+ "177e7c5f6d19cc1e389005ff7afdb7f5dcbb2b08",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.1.dompoint.html": [
- "3110983f7f84aaab0c899803249ca8cde5c3a8eb",
+ "72e8d6ce3356120f6bbb8bb7ec3a419e6fc31b79",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.dompoint.worker.js": [
- "3bdb12e029893c969843fc48140d345a5d8a137f",
+ "f27f696f1c7e05c954520f264b920fa970774c37",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.1.dompointinit.html": [
- "976b39a10216046702bcea5c883ff667843d5568",
+ "df6bb11e02caaf17b12e7ac05b040213000d043e",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.dompointinit.worker.js": [
- "86b43ad2a1946c48ba33a386009652171e711a77",
+ "2f9d2eb30f844126a7c344fb8863d640705fdda4",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.1.double.html": [
- "c75d6420c9c5546f289508354e25214d1a38b681",
+ "b669a7bb6af5694e9fcd814f9b1f07dbe2d995a6",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.1.double.worker.js": [
- "925c93b0c9098ed97660e921b08e5bd8191aad76",
+ "9658a39cfbb110a07bbc0bc5a969f6f094a792e6",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.2.dompoint.html": [
- "33d861d6dcef4772dcdb66edbe3f4c8dbea5920b",
+ "b387d88990ba3fe73a05139afabd21ae6cd13269",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.dompoint.worker.js": [
- "12d1a8c8e633c6933789f477ee082e4df567c265",
+ "83d3f66b3cf1b89588ac29cddcf4eac5045a507a",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.2.dompointinit.html": [
- "b088c2e717b56eb5789b988a17befa6a2de46667",
+ "76719124e2b25689b5bf843a279dee68f3d51cea",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.dompointinit.worker.js": [
- "49a247a26634edf2c57756ed9a32425891160939",
+ "21766040b466593b54c0fc967bb2c8c379229b2b",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.2.double.html": [
- "71395e0e9ee069c239bdcc3bc2aea22de35a3b82",
+ "001cb8429caf97d8f1973e1775dcd06ac0911c94",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.2.double.worker.js": [
- "f868c6272ef19dddbbd67fdc20e82a6ec4cf9b72",
+ "b9935a1bd9b2ecb9b40061e93fe9b54063f36363",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.3.dompoint.html": [
- "4922bf37f22a0d4bc24edd67ab61061ed4710635",
+ "5c8c686086ebeede3dd34d31cc8cf33c80611720",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.dompoint.worker.js": [
- "2da2f3591c614d01871e9390e192be6cbd413859",
+ "819b1a39867c7097f4c1e0576e73ce64c51b06d6",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.3.dompointinit.html": [
- "3b6f2fd863f7b75ee6fa59bfa0af3134a5382446",
+ "1b94b7d7ed553a66d4a95d9bd977218c3b3003ee",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.dompointinit.worker.js": [
- "65a3feb36f436c687a2b35f9417d13d404af7409",
+ "e4bd04aa29647a24ec5cef0ab9153461ec40af48",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.3.double.html": [
- "3dd2af98007fe9a2a44bd16104ddae43bb07f35f",
+ "2a76d2b7b1f56cc481c20d17945b409da6a5886f",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.3.double.worker.js": [
- "a327ceac1579cdf60d0966bca11a0366e7d50ead",
+ "ada627b469531edae465311ea67ff5b6e4d5b65c",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.4.dompoint.html": [
- "d61a3133cc476cab242cf49febe48950fdc8c0fe",
+ "ce86e45e8b3cb137c42ea013540d4f77d5ccf2fb",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.dompoint.worker.js": [
- "d8a121e6da90bcb7c8307c0d5b8f0dae4df22254",
+ "770291c6f9ab231fd5f74a3d8962ce563c38ca76",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.4.dompointinit.html": [
- "94ffc00433e099c73be839b27962e2f19141f81f",
+ "f0ec6c3b999830be6f476a79ee430342f29eb489",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.dompointinit.worker.js": [
- "b7babb529615683008d95f0a1ad5779dec32554f",
+ "48310c6a30b44f72abb63ef63922edea23f0d007",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.html",
{}
]
],
"2d.path.roundrect.4.radii.4.double.html": [
- "4ab2581847640217efbe0a6c2df7eddfedb15bcc",
+ "6940622cf032b5e65be17a08f32e0c1b7921f42f",
[
null,
{}
]
],
"2d.path.roundrect.4.radii.4.double.worker.js": [
- "ad4cca4953600820750cb5b74d4a3a7f6b5a5428",
+ "e97ebd98ff76931dcc5b1d71d7288759d3db86dd",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.html",
{}
]
],
+ "2d.path.roundrect.badinput.html": [
+ "97b322971c3ca1842af90c3012b8ce075025ee05",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.roundrect.badinput.worker.js": [
+ "461dee89adeab7ddd928a81363a00e538f6e0d07",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.html",
+ {}
+ ]
+ ],
"2d.path.roundrect.closed.html": [
- "1b4abf012c7067f6f06563e537e7885e1a1ca5ba",
+ "7407ead9cf5b22218fbdf45ce701cc914ac1fd02",
[
null,
{}
]
],
"2d.path.roundrect.closed.worker.js": [
- "e0f1b81aa42f58fd7379b3b0dd75b2f59b6edc02",
+ "5a9530a68339d217027694d99db324eef043ec98",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.html",
{}
]
],
"2d.path.roundrect.end.1.html": [
- "5c6b3cd537d16384442f62274b8ac3b091845905",
+ "d73b82bee4a9a8c5a30b61b426eb0f6b0e6cabbb",
[
null,
{}
]
],
"2d.path.roundrect.end.1.worker.js": [
- "1ec22bdb6a77046cac6b03ee6c1f8cf4d4276081",
+ "9428df5bbd1edc32f24f667818c1697d0fcc0a3f",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.html",
{}
]
],
"2d.path.roundrect.end.2.html": [
- "3913f69d412f9afeb140e3c7dee8ddbcc1218ca0",
+ "ce9b44ead125129b1cf002664ccb45b04bae6ff8",
[
null,
{}
]
],
"2d.path.roundrect.end.2.worker.js": [
- "c3085d53c3b05b72c05a387769b72cb62949896d",
+ "28f1ca1787a1b795a7d31e4303dca51bf9d607b0",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.html",
{}
]
],
"2d.path.roundrect.end.3.html": [
- "349f13485c04eb0b9fc509e074cdd1e59ca7a9af",
+ "72183ecd05e69c1ca5f9a53f84910a777aa2b121",
[
null,
{}
]
],
"2d.path.roundrect.end.3.worker.js": [
- "52b9c442838b618dad02ad4c21dd986b230e40c3",
+ "57cb328cfa53a716534a992cce65c1209b75ee8d",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.html",
{}
]
],
"2d.path.roundrect.end.4.html": [
- "3c99e3970a1557649637b4bcfa4b0395a0b05dd5",
+ "c4fdee5958ee4fe0a71ebb28c41ac5225b7fe82d",
[
null,
{}
]
],
"2d.path.roundrect.end.4.worker.js": [
- "1d57b8978f2871ee2cc6448e9a72b0c9c2682c72",
+ "a97a37d1572716a9323548d7d3d8fceee0f08931",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.html",
{}
]
],
"2d.path.roundrect.negative.html": [
- "e3696ca1a5b78c2b27470e220b2fe15d0e45d1ba",
+ "aa8365724487b150ed0d0f50fdde4cc29cc94bdb",
[
null,
{}
]
],
"2d.path.roundrect.negative.worker.js": [
- "c34c20397a898bd866a3c11f2a0178b490abbdb5",
+ "14459238ed1072ac03877d6e5b270485603086f5",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.html",
{}
]
],
"2d.path.roundrect.newsubpath.html": [
- "6d0a8149077a49f4153d14d9ba3d2e07a737d7fb",
+ "3ad7e5bb5b9535baf311a8003d7b842f2c21e483",
[
null,
{}
]
],
"2d.path.roundrect.newsubpath.worker.js": [
- "c6f7934bee952684bfdbf05d909ec53d72c50bcb",
+ "757327c60d310f4d5968fe5738ec581fba8446cf",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.html",
{}
]
],
"2d.path.roundrect.nonfinite.html": [
- "29773503013118e309faa3cd4b3b38c8ebaa0a5e",
+ "adddc7b9b89487a69b523105c084f2613a0d9c06",
[
null,
{}
]
],
"2d.path.roundrect.nonfinite.worker.js": [
- "68d0d8a09a3b3158896dafa73688b233aff65841",
+ "d6d44d6ffe0f04facd2dfd1646f1bf2ff0d66176",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.html",
{}
]
],
"2d.path.roundrect.radius.intersecting.1.html": [
- "c1916bf78f29e60db84ef8b5e24ddba9c06093c1",
+ "db4d871f9f6a9f367a61d8479bf8634ea3219c51",
[
null,
{}
]
],
"2d.path.roundrect.radius.intersecting.1.worker.js": [
- "9da41478d91ec440178fd61a8f4a37f60ff8bc9a",
+ "27076dbe21f1d58b453c30cf98f51fa81a7a8f5d",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.html",
{}
]
],
"2d.path.roundrect.radius.intersecting.2.html": [
- "f2a69c4ffc722a9c39881d4b8d15f51aa9111b53",
+ "985942ca361a7b94d3a3541862b1ba78f174165a",
[
null,
{}
]
],
"2d.path.roundrect.radius.intersecting.2.worker.js": [
- "f0d3f57ca48d0c2b9f58d55124179f418c79df95",
+ "5b6de579ae12ef295937987217d99cdc958a144f",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.html",
{}
]
],
"2d.path.roundrect.radius.negative.html": [
- "55e344d37492eeb56a95fce804a8605760b73d1b",
+ "60a7bebd24c2ffacfccd905b490b31928be94d1c",
[
null,
{}
]
],
"2d.path.roundrect.radius.negative.worker.js": [
- "050e5f7f007f68b764e88d0cc7640465185616cd",
+ "554a1ac078e32375a390ada7bd8916577fe20989",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.html",
{}
]
],
+ "2d.path.roundrect.radius.noargument.html": [
+ "26a69afad07a1cb115d707bb2dd267b8305161cd",
+ [
+ null,
+ {}
+ ]
+ ],
+ "2d.path.roundrect.radius.noargument.worker.js": [
+ "1f6227786b674a5b9f4fc0b5c122a3772a37f3a3",
+ [
+ "html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.html",
+ {}
+ ]
+ ],
"2d.path.roundrect.radius.none.html": [
- "530efe46b1f11d78072a011205cacd7718ebcf88",
+ "763113e43884befead71e3f54ffac0ac0f392b0e",
[
null,
{}
]
],
"2d.path.roundrect.radius.none.worker.js": [
- "3209e421de6e2bcfa3293276785a605cb6d7ec0b",
+ "fefd1b4dd39a65d2dad752adb35938f04ca271e8",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.html",
{}
]
],
"2d.path.roundrect.radius.toomany.html": [
- "c667dc690af9e40fefc0a86dd1b4a026b1f67117",
+ "ce330875fb30f7a4b60007f56f790db3596b2eeb",
[
null,
{}
]
],
"2d.path.roundrect.radius.toomany.worker.js": [
- "3b05057eda3d401ce231654671514de73c341b97",
+ "e1250afac705fd7cf954b89529063fbf75981995",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.html",
{}
]
],
"2d.path.roundrect.selfintersect.html": [
- "0ec253549036ea114cdfdea67461a79c543f523a",
+ "15ee6f4958132be067c018618bebfb964c29308d",
[
null,
{}
]
],
"2d.path.roundrect.selfintersect.worker.js": [
- "8b6221414bab712441cc2dc67048806f0553c0f1",
+ "91741110fc76a405096fde226702ae8e7fe0632e",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.html",
{}
]
],
"2d.path.roundrect.winding.html": [
- "e7f52fbf29252fae0daa9fa661cd249449208073",
+ "47ecd777dc058d3484ff329232f01f463fcaed52",
[
null,
{}
]
],
"2d.path.roundrect.winding.worker.js": [
- "82e6b5c313507f873572bac841318bf580ce5456",
+ "737e99f3731a95eb61fc3c69567ef3d59940c58b",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.html",
{}
]
],
"2d.path.roundrect.zero.1.html": [
- "252475194ee89cdef3dfb4853fbb5b19bd1bce30",
+ "772339dcc692a9af239b05b3671486fe91a34eba",
[
null,
{}
]
],
"2d.path.roundrect.zero.1.worker.js": [
- "17c9be78ec6f064b6258b6a9334a7a405a78158c",
+ "afcaa207699164a602b882d8096d9740c4567616",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.html",
{}
]
],
"2d.path.roundrect.zero.2.html": [
- "2463e88f1eb913236d94657b73aea50a495726b1",
+ "2aad5aad4177e3c1165a704b6133f4b2b503a8fa",
[
null,
{}
]
],
"2d.path.roundrect.zero.2.worker.js": [
- "9ae058a847667cc243925cd341956df848f9e152",
+ "dec178bd202e512e813e654d335997ae5590b678",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.html",
{}
]
],
"2d.path.roundrect.zero.3.html": [
- "39de433b081bdda5ebf67899c47eb9058113d4be",
+ "485384aaff8dd1af98beb4e4b3cc4197d1d7900f",
[
null,
{}
]
],
"2d.path.roundrect.zero.3.worker.js": [
- "98d37e08e534336b145cb2e3ab83d76fb972acd3",
+ "88adb5c437352583bcc15ad2a4dfc2b429658296",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.html",
{}
]
],
"2d.path.roundrect.zero.4.html": [
- "3c6c734b19b15fff1060fbf7a07ca5b0c03e26d8",
+ "dfd4821a841d6e13754c4fc6a21183e147810506",
[
null,
{}
]
],
"2d.path.roundrect.zero.4.worker.js": [
- "462cde2a03e88ed1dd7c5a53a4c15eb9b1b78783",
+ "fe8cc149c5646a441557bc105deaa11f29aa92b8",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.html",
{}
]
],
"2d.path.roundrect.zero.5.html": [
- "de66603a66b6168e4c60293f917e531e0073cfa7",
+ "931a737e3bbe95b99e7fb3f82a4b6322dfe97fc0",
[
null,
{}
]
],
"2d.path.roundrect.zero.5.worker.js": [
- "0f706ce246fee9b87a2a595f901d6bc0e6585344",
+ "1fd61246a98709ce91cf6836229db95f165eebc3",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.html",
{}
]
],
"2d.path.roundrect.zero.6.html": [
- "bd7ef0fa94c49c0abf8315a65572a7e0d85a2605",
+ "25ed23d3293b0761fd9869b4228d436248dd6bff",
[
null,
{}
]
],
"2d.path.roundrect.zero.6.worker.js": [
- "f2115cdd4610f77fc279e62b6864eb33191acd65",
+ "c4b6fba5b0a27e381d151b971e2493faa38e4af4",
[
"html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.html",
{}
]
],
"2d.path.stroke.empty.html": [
- "a873b260da2ba91c4353601c0367f39782fea0de",
+ "29a95da20d521c6d4a50974d7a68d13ef6b4c05d",
[
null,
{}
]
],
"2d.path.stroke.empty.worker.js": [
- "1852c91876810880da2e27973014b0e6899953cd",
+ "56ee68f185bdc75d2799cc969ea7f3768b0970c6",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.html",
{}
]
],
"2d.path.stroke.overlap.html": [
- "252a840ed7536c5268649eb71036e031546a5272",
+ "c3847464bb7ad990f37f3dc5fafbd2370f9367bf",
[
null,
{}
]
],
"2d.path.stroke.overlap.worker.js": [
- "aa7cc51d77402dbbf9ed23e178f00aeced43aa5b",
+ "0e59d3bfc0a3bf9e2b5b9f5cbc28b5a41ea7c575",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.html",
{}
]
],
"2d.path.stroke.prune.arc.html": [
- "67f25440dcd3975b3a495b1c7214df962a4c8969",
+ "40a73b85fbb46bd89edec2aaa7084d66494c32b0",
[
null,
{}
]
],
"2d.path.stroke.prune.arc.worker.js": [
- "ca5844ce2aa5ba7b6e9cf99a84504ea3f2be47b6",
+ "880e8146ba5ae9a60227d79fdf9b1f9a311f09db",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.html",
{}
]
],
"2d.path.stroke.prune.closed.html": [
- "1012975fcf41e37ae58481629dcef3bcb56db11c",
+ "2a3b40068dd6252e0e656dc9958082acf669260d",
[
null,
{}
]
],
"2d.path.stroke.prune.closed.worker.js": [
- "9b3426f6d0cabe45976e01da9a05349711199f81",
+ "e1d271bf6aa47b50d1981c7df70d1fc11e490fb6",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.html",
{}
]
],
"2d.path.stroke.prune.corner.html": [
- "553fdb616575c03269287b82b6eeab5747c8cc03",
+ "45db65d6d11097f5a67571b1803361c7ae04807c",
[
null,
{}
]
],
"2d.path.stroke.prune.corner.worker.js": [
- "c2233bbc15b90878842baf8d45619c4af716c516",
+ "fff4ba19e98d0b83106514a240789566c61cc507",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.html",
{}
]
],
"2d.path.stroke.prune.curve.html": [
- "ae2f922a41bd3b205b5be2e6e9827c3ec8aa6254",
+ "946395f1c17615ff0927e83eda85ea008884943a",
[
null,
{}
]
],
"2d.path.stroke.prune.curve.worker.js": [
- "7dc88a72134ba25ca8691a9b16045235f3f09435",
+ "ed960fdbe7f1a05f7868085c3011ec059fc3e5f0",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.html",
{}
]
],
"2d.path.stroke.prune.line.html": [
- "e9163cab40d1cec34bbaf480ff680dfc2d149623",
+ "1f0a892455c9eac1ca631d88fe1b3599432f03d5",
[
null,
{}
]
],
"2d.path.stroke.prune.line.worker.js": [
- "160bbe7eea3c28e9949a1036d4dbc0eaa297c559",
+ "a00e73bcbbe974b6c60c1560e163c14e7c35e9f6",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.html",
{}
]
],
"2d.path.stroke.prune.rect.html": [
- "72d0d6b6e9809f16dd4c0952cbdf8b7624b0965b",
+ "ffce538d91907f119b2ab91707a0bbc12471a701",
[
null,
{}
]
],
"2d.path.stroke.prune.rect.worker.js": [
- "c6ed67ed9e4aacc957914b00455f24544af4da2c",
+ "87bb533ff9ef982d108dc5d9ff5235b58d2dbeca",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.html",
{}
]
],
"2d.path.stroke.scale1.html": [
- "e13fd9fe550bdf2ba15bb14411568f5ac035ca52",
+ "47639065d330f71f562508921da189095adc7298",
[
null,
{}
]
],
"2d.path.stroke.scale1.worker.js": [
- "ef7b2d4d04e6e034f6c90082d5243e2c52539746",
+ "3725fdf6e876feeb028336cb42b8dd05c1e8899a",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.html",
{}
]
],
"2d.path.stroke.scale2.html": [
- "2b80f16898eee98e5ddc01395d4212dbb0d4056f",
+ "447a6dfadc424585a465b01bc4780536d62fb659",
[
null,
{}
]
],
"2d.path.stroke.scale2.worker.js": [
- "9c6d4fbf54a34d00e03a5e1b2ef35264bc43c70c",
+ "5223de78166ab9cb4da576dcb4c5dbf7ed7d08bd",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.html",
{}
]
],
"2d.path.stroke.skew.html": [
- "55e96e08e06e460f3da40dc6ba9194918a320801",
+ "1fb118b12264aa46f19ca8dd9368dd0ae0cc1f78",
[
null,
{}
]
],
"2d.path.stroke.skew.worker.js": [
- "745afe4ff53ccaed94d9a77b72ca3f170d1db281",
+ "e65b796d068b755bf8afb61a9bcaa2e343be84a6",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.html",
{}
]
],
"2d.path.stroke.unaffected.html": [
- "58e7f75dc8e504c75b69196ce3c2f266966aabaa",
+ "3fc9cfad8835582460769b18686ec451dfbde3df",
[
null,
{}
]
],
"2d.path.stroke.unaffected.worker.js": [
- "a47c32d0099eec7289874dc5f937a0c119f52d51",
+ "d9df1ada9430a68967f7b0ed3bf7736c29b93e1b",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.html",
{}
]
],
"2d.path.stroke.union.html": [
- "c3f063fe52d32ae61bf37340acf5d867280dcd33",
+ "6b980acff2dacaba83a7ba62850b4c2f18435e06",
[
null,
{}
]
],
"2d.path.stroke.union.worker.js": [
- "282cb10bf75d8dfcde1de8eae49208ecbd10ebd8",
+ "3b05feec0398b0709ab0451726228422c9ddd1ab",
[
"html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.html",
{}
]
],
"2d.path.transformation.basic.html": [
- "18370041384d0b7bc6b039c1e85ba81c80727ac2",
+ "27f00aae0372fe2fa28c8a016df3a53d4cb761d0",
[
null,
{}
]
],
"2d.path.transformation.basic.worker.js": [
- "7bc112dd1d0b2c90c6929bacc7f921b525b5941f",
+ "3ae4c876d5bcf680f949e487b1c0cdbfea6989c4",
[
"html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.html",
{}
]
],
"2d.path.transformation.changing.html": [
- "b8a467387d55d49deaf0927a4da7c30ecc2e1249",
+ "786a5cf5891b2f05ff1747be699e66145e272b27",
[
null,
{}
]
],
"2d.path.transformation.changing.worker.js": [
- "2460d24b199e378a4aeeef4b4ce731885178047e",
+ "2d8993c685c176b11feaebe49effe0ae13f1cecf",
[
"html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.html",
{}
]
],
"2d.path.transformation.multiple.html": [
- "fcc2942435f5e02d5ce3df781bd73b6a840e56a5",
+ "636491bb0eee665c71e0d07113fd0752b58cbf41",
[
null,
{}
]
],
"2d.path.transformation.multiple.worker.js": [
- "a2a04ca7776a9bbf8ca947babdc591edbb36e8f8",
+ "a9fb37d0de1012a2519db384d2949a812a069a9a",
[
"html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.html",
{}
@@ -596570,770 +597702,770 @@
},
"pixel-manipulation": {
"2d.imageData.create1.basic.html": [
- "1f21ce6e32bbf8aea4202e5ceb5176cdcfa06055",
+ "f6932386dfbbff3cece04b82d8a7576e43675b8c",
[
null,
{}
]
],
"2d.imageData.create1.basic.worker.js": [
- "54d2cadb1c950171e0b723355e9a68efc486f258",
+ "30f3ed21b19efc0210d03b7e3eb7f9d1ca7fbc09",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.html",
{}
]
],
"2d.imageData.create1.initial.html": [
- "6e9e02c77d0e1db8b303fedf980ed10f7dfb9722",
+ "627b09b8bd265fad5616d4fc8ebaf88714bb99bc",
[
null,
{}
]
],
"2d.imageData.create1.initial.worker.js": [
- "bfff76b29fd941646aa0bb136fbe96700711f235",
+ "da0856a487c51d9d34b242495979840f19d56b16",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.html",
{}
]
],
"2d.imageData.create1.zero.html": [
- "a4d074043f30415b91998f568dbb05d0322e818e",
+ "b5a95172b61cfbbf04ed6c4d2f4c5e75e78ada8b",
[
null,
{}
]
],
"2d.imageData.create1.zero.worker.js": [
- "c51067ed6204ca062dd705e79a0b1e4299d063fa",
+ "1eabd9ebf316405abf31fb86cb2875cd96734608",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.html",
{}
]
],
"2d.imageData.create2.basic.html": [
- "4e99cac955fa01ce0c1e54b6f7b8236fea60775d",
+ "7c265f5209d42756326d5eceef33bb616d2130c2",
[
null,
{}
]
],
"2d.imageData.create2.basic.worker.js": [
- "e99cbe276bc03e027fc1ec295ec9f3966f981c26",
+ "26ca82929cb978be6ce8b92cf8cd4fb99af9bfcc",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.html",
{}
]
],
"2d.imageData.create2.double.html": [
- "d927f28854d795f6a30fa2ccd5280c52438e4899",
+ "ca54641a30e1192df8791643d6710e208ea7282b",
[
null,
{}
]
],
"2d.imageData.create2.double.worker.js": [
- "773204cd418b7c67f57249d730ce74af92962434",
+ "2f3416d0f0e85ecc2bd1119d553794e4b8a6b430",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.html",
{}
]
],
"2d.imageData.create2.initial.html": [
- "10029344246c77922e53902b3fbdbc31aaf9c902",
+ "566a9a30db23dda130c49384a9fb404a6e23f52f",
[
null,
{}
]
],
"2d.imageData.create2.initial.worker.js": [
- "0e681dee076b1fb18549ec40376662001589ea03",
+ "472e1dfd2e38507f747a6cb6e22b2754468411c3",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.html",
{}
]
],
"2d.imageData.create2.large.html": [
- "e18893e9086bf12cc85c00eaa617fe9a06c50a95",
+ "75b8f737fd94330fc352cbf32f05221c7f203f64",
[
null,
{}
]
],
"2d.imageData.create2.large.worker.js": [
- "57dda69d4d0ef485f032daf584e767bbd9777118",
+ "e2b85bfb69241fb8b571c48b8d70c472ead86ac7",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.html",
{}
]
],
"2d.imageData.create2.negative.html": [
- "9272c9ed9c1640470f436a0b0fe9e54c5d71e6b8",
+ "b41153c28242c5a0519bdc22780d44047ee191c2",
[
null,
{}
]
],
"2d.imageData.create2.negative.worker.js": [
- "a5cb85729556089650db0e01821d6a5dca8be372",
+ "62ed60e1029d1ba1b147fbfafc5a95acbe96383b",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.html",
{}
]
],
"2d.imageData.create2.nonfinite.html": [
- "f51dd744210ea9dddd5eb29b1d0d5a3d412ecdae",
+ "dd6f6d83501490a6da691e7dbfbd4fa8d4ff6e1f",
[
null,
{}
]
],
"2d.imageData.create2.nonfinite.worker.js": [
- "ace0f64f94e21fcd8b84f77143e90f3d4a5f4675",
+ "18825588bbcf4280c7d2efc61c0d663d52fddbbb",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.html",
{}
]
],
"2d.imageData.create2.round.html": [
- "046a04dbcca94a9e7d58bd7d2988032ddd024861",
+ "0ecb2fb686a93b7bcdce60c3195cd63e777d1c78",
[
null,
{}
]
],
"2d.imageData.create2.round.worker.js": [
- "2387498418879678cc282d783a203a646bcaa05a",
+ "b416a02bf2319fecd9a4162e741ce9dd19fd6b1e",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.html",
{}
]
],
"2d.imageData.create2.zero.html": [
- "f109c7dc03fea25a69708a6c5ea688f11e81f911",
+ "2f7082a7f063c6af163471604598b305e9672856",
[
null,
{}
]
],
"2d.imageData.create2.zero.worker.js": [
- "061e4ca13664f7c2e6807dc4d656008d3651dcd2",
+ "7f57c338988f4f9b3dc90219a22aac9b69abbe25",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.html",
{}
]
],
"2d.imageData.get.basic.html": [
- "e9cc7e980182c535bff93ee7122dbc562aef3227",
+ "d810e64e38b09d6215855abb5b59bf1d20b7b5f1",
[
null,
{}
]
],
"2d.imageData.get.basic.worker.js": [
- "8accaccc752f3eb4f885e47bada4c8e9cfd1d8ce",
+ "f28268be17e77397b03344380721856429345376",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.html",
{}
]
],
"2d.imageData.get.clamp.html": [
- "f832c51c5504d569b6d5c744e7332cb63524ba19",
+ "825d00a5c4c9fe4cd9c9652e0331f5fd9273fc6b",
[
null,
{}
]
],
"2d.imageData.get.clamp.worker.js": [
- "ceeb8d5d868dce0696240dbaa12f18f8574da20d",
+ "fb4e76584a31114f1e539c214b606190b07e1f72",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.html",
{}
]
],
"2d.imageData.get.double.html": [
- "6839632de7072477fc6d732e1449d0ed05dd12af",
+ "64fc7c7c12bbb8d35af6fbc3c0bc5858326f286d",
[
null,
{}
]
],
"2d.imageData.get.double.worker.js": [
- "e05fe1009cb8f4bd4868ae872bbc5fc263f34b37",
+ "316dce7f8076e6f17e07385c4b502b464c86004b",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.html",
{}
]
],
"2d.imageData.get.invalid.html": [
- "df63bd2e2a53c09609f5a036bb66d1495d820070",
+ "dfc5d106ee168f90bb2edae65c7a4ec243469246",
[
null,
{}
]
],
"2d.imageData.get.invalid.worker.js": [
- "c9798f59f63662d7924df13489fc73b495c70f0c",
+ "5206899b6ae54acc3508e7f957011b034b3f1007",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.html",
{}
]
],
"2d.imageData.get.large.crash.html": [
- "5e6102d67d012f529a5d103e0916a2a44096e67f",
+ "3e05c3c92b9805a320853fc81dd8d655a6c6ea37",
[
null,
{}
]
],
"2d.imageData.get.large.crash.worker.js": [
- "142c0b833d003dcb0e9d112974929aeac9377bf0",
+ "62c1771dbab60c89cadffb55ae913cd91434a103",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.html",
{}
]
],
"2d.imageData.get.length.html": [
- "19fbac065356f18040cc38a1df058a45b52ece96",
+ "47b5fcd166fb30d5edd15277789c51f0db46caa3",
[
null,
{}
]
],
"2d.imageData.get.length.worker.js": [
- "dd2e3dd6c5f2c4edfeb6eee1566c8386027717e3",
+ "74ed6015f086654002119f697299380581ea8901",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.html",
{}
]
],
"2d.imageData.get.nonfinite.html": [
- "b9324865b6b43cd3b33f932189d4fd62a57a7af8",
+ "62cad618483662c2b2533eca05fe6692b519c7df",
[
null,
{}
]
],
"2d.imageData.get.nonfinite.worker.js": [
- "da70d1b21382f39528a02a092c9f635f5f4f7b61",
+ "98b4913a132e2b956842052c078345018e569622",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.html",
{}
]
],
"2d.imageData.get.nonpremul.html": [
- "89eea879318965101e69881dce49e033df21985c",
+ "3a97d9dc05bb3d20d8f1df657e245fa913305801",
[
null,
{}
]
],
"2d.imageData.get.nonpremul.worker.js": [
- "d568c31b38d890aaaeb53a100c9b2eb2d43a64b5",
+ "1a8da5efb0a00d165d1ca19110409560a3c8c7c1",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.html",
{}
]
],
"2d.imageData.get.order.alpha.html": [
- "f79f5f351e010ee4b94b6dc8c5d2239cab7fd723",
+ "04eb67902fab423afb665fe56d2c347062d76ae5",
[
null,
{}
]
],
"2d.imageData.get.order.alpha.worker.js": [
- "038844816f354c5eb2d4bd03e89a639516318acc",
+ "4338436a6df4ae62ee905a728041897bc33d495c",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.html",
{}
]
],
"2d.imageData.get.order.cols.html": [
- "9afceba7023a1eccd5cca36d398191d789ee237b",
+ "f5b315c60a3943864b176f08d42ecede892fbb7f",
[
null,
{}
]
],
"2d.imageData.get.order.cols.worker.js": [
- "6a13c4dee655a7fc3402f2d104cebdfd2f79c034",
+ "6a070e251699ab309bd96d7122ccbfdfafa507f0",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.html",
{}
]
],
"2d.imageData.get.order.rgb.html": [
- "0fd4759409e162ac5e30499b677fcae1d4c3d9e8",
+ "661b437fb1b677d853c4e8604bcf79483f9497a5",
[
null,
{}
]
],
"2d.imageData.get.order.rgb.worker.js": [
- "771a777b9bd0170e64445a9224cfc685f6c74d19",
+ "4e5974f9f863b6a9f2f89b1d6292ec330440a446",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.html",
{}
]
],
"2d.imageData.get.order.rows.html": [
- "eb7a137ab19cc85067d37589bea60b8d45812094",
+ "6d8ee2eba5e744e9fa0d4d16c452c5e90d37cf1a",
[
null,
{}
]
],
"2d.imageData.get.order.rows.worker.js": [
- "1f75f9301c927f07849f7d8e179041d575e22dd3",
+ "1d3226a50330f97d20249f8d8c1e0e4f9372e1b5",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.html",
{}
]
],
"2d.imageData.get.range.html": [
- "91c0c5844a5cd453b629f1923d53614b1a69912c",
+ "8db1a42ca11dca3a73b1e78b7246115035324a44",
[
null,
{}
]
],
"2d.imageData.get.range.worker.js": [
- "9389c22bd31bd5398897a084b61e4e326a12f5ae",
+ "2e962beeaed9049710b28f8a241da423bf86b2ee",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.html",
{}
]
],
"2d.imageData.get.rounding.html": [
- "a06d180a57553087b3c20f72daddd04c43c201fb",
+ "f939ba82dfa559ea96da6cfdea8ff9d67f2ac3d8",
[
null,
{}
]
],
"2d.imageData.get.rounding.worker.js": [
- "8cdbf790f9da881d9f513dbfa178683a93bb38f4",
+ "b2cd08ade2cc496291027ed4e6a70e2e453e64cd",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.html",
{}
]
],
"2d.imageData.get.source.negative.html": [
- "7e9d36338d776f4933e0c0e8998450eba3b9f885",
+ "a4b9c7e41c7a1e5ef36bc95cad3461a0b6931593",
[
null,
{}
]
],
"2d.imageData.get.source.negative.worker.js": [
- "989178792a098d7b09c81e3eb573078ba37978c7",
+ "62929918ec4ce94618f3a5395df58d1cbd9ca68e",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.html",
{}
]
],
"2d.imageData.get.source.outside.html": [
- "7dbe2dd1b34ebfd998b0f07b6e7035e501be324c",
+ "ca11da80d50a14ea5aa44ee4558a83bdf6860136",
[
null,
{}
]
],
"2d.imageData.get.source.outside.worker.js": [
- "eb7f355d6832b94b97f870e7224273da24ecbdcb",
+ "35fa83d6687fb3baa977f4bd70b2e57d1d953226",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.html",
{}
]
],
"2d.imageData.get.source.size.html": [
- "8a8a71d98845f837182aa8c26e8b4a4e2feaad1e",
+ "6cb848a7187190f4801d94bf4683610f041c76ae",
[
null,
{}
]
],
"2d.imageData.get.source.size.worker.js": [
- "111f4b586967a979bf11178d3d3707e0086e0454",
+ "e54d75b97a6cb124b19b53220f63a52073d8281b",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.html",
{}
]
],
"2d.imageData.get.unaffected.html": [
- "c096cc5be31d513775e8f145598227fc8de296fc",
+ "66a0b80fd71bb92e8484f9557c7980119f9d5cd4",
[
null,
{}
]
],
"2d.imageData.get.unaffected.worker.js": [
- "a733c6ffdf73c654cc7b5c2e09bb3c79c9b7e286",
+ "8bf0dddb0630ab95894bdacd4a324b4ed5d5c81d",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.html",
{}
]
],
"2d.imageData.get.zero.html": [
- "9bad2b784394e293c9e1525aadf2e8c23b2109c2",
+ "042a8bc5f541dba90f4eb99adbea7c99deb672d8",
[
null,
{}
]
],
"2d.imageData.get.zero.worker.js": [
- "82f021ca8d4a28c0550380c251fd386a2f51a525",
+ "ed31030d3cc8e9a380e7f3fd93f3c3e00b69a7b0",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.html",
{}
]
],
"2d.imageData.object.clamp.html": [
- "1bd6224892ce69f73362af234a3fe052642f7524",
+ "aa6073eedf5d62d674545dd47a5ccee8a9aa551d",
[
null,
{}
]
],
"2d.imageData.object.clamp.worker.js": [
- "0914c8fdc7548a704c862f51e8cdb3432ddbec9b",
+ "260198fe2fe71afa83aff601f4f73aa0e9b27370",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.html",
{}
]
],
"2d.imageData.object.nan.html": [
- "9910af8e2af927cc37f3c9e9753589a4b43a6154",
+ "af692a7f9f31498fa19594f5f6445b74dff49e01",
[
null,
{}
]
],
"2d.imageData.object.nan.worker.js": [
- "ef2eb21b3714051666378d250d5e3fd4135eb26d",
+ "4ebfedb1e830f5cac26e5f90f52df897dda1f594",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.html",
{}
]
],
"2d.imageData.object.properties.html": [
- "13dd36953289b83d10e3cefbcdeb6ba5170a77c9",
+ "68a6f6386869b16cb55bdaadd18a98718bec6acd",
[
null,
{}
]
],
"2d.imageData.object.properties.worker.js": [
- "42c89ef117956a6432ad4de26270bff52ecd9216",
+ "e428e0d4fcead269bcc1c85a1212386754e129d6",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.html",
{}
]
],
"2d.imageData.object.readonly.html": [
- "a141786fec8fb28bce04ae91d3b2c3a155d2fe62",
+ "2ab5f47f64e726d6656152f311114b18da14e63b",
[
null,
{}
]
],
"2d.imageData.object.readonly.worker.js": [
- "068761e2e6405bba450b149ecca126c22e9e3db8",
+ "d02f0f319aa26352304c2b01b6738d8cbe3b251e",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.html",
{}
]
],
"2d.imageData.object.round.html": [
- "306ccb8df448231c7ec4d6de2010a27dfa228ee5",
+ "fbde0cd940eef02bddb0ad497b55afe465b9bb03",
[
null,
{}
]
],
"2d.imageData.object.round.worker.js": [
- "4a88db9cdd01e19c1750fb6d369d17ce9fc3e108",
+ "8ef3c0279326db8620679441e0c56bef05b92a17",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.html",
{}
]
],
"2d.imageData.object.set.html": [
- "a5808b7777223ff6ed31909cc34d00e267bb3b1e",
+ "27ed5a35047fee215dbef58e75fb0c6d5a210abe",
[
null,
{}
]
],
"2d.imageData.object.set.worker.js": [
- "fcb16ab577fce3ae2f4f9aabf4cde50f85a69dc4",
+ "f9b755f7e263352619c09254311e49ee8e59db81",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.html",
{}
]
],
"2d.imageData.object.string.html": [
- "5245f3a6757d8988e56bc5b88679f01edd425984",
+ "a437c475a59c3e4a35185b6e62b9110e6a017d4c",
[
null,
{}
]
],
"2d.imageData.object.string.worker.js": [
- "6c2dcc8b42fbe07108c58a23c5cb710a6fa1a9b6",
+ "84cff6a48c165a2e3b7696c6d0cc1cec153d196a",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.html",
{}
]
],
"2d.imageData.object.undefined.html": [
- "3290c579bb38c7ea5a994f3923551810bd07c91a",
+ "81462339e9bfbbb68f96d78d617b204086124364",
[
null,
{}
]
],
"2d.imageData.object.undefined.worker.js": [
- "f6b62993f6c99c4c17e5cdf73e346eb807e8a206",
+ "825f8c102f4218d39ed2c10febd752bbc9c3f257",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.html",
{}
]
],
"2d.imageData.put.alpha.html": [
- "4e64e4207e2376b46a183a6d55b1543ce6213a3b",
+ "dcd2d92ab137a8d14ca7148c73102a2e205baf7e",
[
null,
{}
]
],
"2d.imageData.put.alpha.worker.js": [
- "3349c6928699e96756764049bdc1571c06ec480b",
+ "25d80471897bc079703f92a8fc6ac629d2da95ef",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.html",
{}
]
],
"2d.imageData.put.basic.html": [
- "76f143ad6aee54ec40c8899b234789caaa6be1d4",
+ "257e0330d52a7cd09f154800757d1af093c92bd5",
[
null,
{}
]
],
"2d.imageData.put.basic.worker.js": [
- "276fea2d126c580bda7cc8a24548c8edaca4da60",
+ "6a68ffa792eea103ed9dada38ae6dc36f89d8c5c",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.html",
{}
]
],
"2d.imageData.put.clip.html": [
- "fef4c2c1a88f0308f05dd8b8cbec74923ffb3a3e",
+ "648ded588c21d89a862c3af6e52c301e6afcd197",
[
null,
{}
]
],
"2d.imageData.put.clip.worker.js": [
- "9188b3cf88e52a565f14ac6c0fa08adeaaa9e4df",
+ "b665edbb33613624257424eeb68e8a61ddd3df23",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.html",
{}
]
],
"2d.imageData.put.created.html": [
- "d936c02d418a01e3126eb8d251950651583d4ce7",
+ "08f35117ddb7d754aaeca94d0a21925d3731a665",
[
null,
{}
]
],
"2d.imageData.put.created.worker.js": [
- "fd6b5ec8e098c4b3aaf59439ddc7a1cb2c72c5a2",
+ "f249efb4bb5c6b751ce24afca267cc1c6ba43a46",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.html",
{}
]
],
"2d.imageData.put.cross.html": [
- "e00f9bd0db5520352003409dd6b5794d16fb94c0",
+ "cddd0451a45c564f6435590457817a0f33ac18e6",
[
null,
{}
]
],
"2d.imageData.put.cross.worker.js": [
- "bdeaa352457f7dc2f66b5d2cfa0ec34a1bce7de7",
+ "0ec4ed142f7f58e6b27b67c689b861fc7aca2c60",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.html",
{}
]
],
"2d.imageData.put.dirty.negative.html": [
- "7493abc0cbb41db460613f5876be89a34729e9f0",
+ "cea4d0d47758cf71b999cd7e01ddfbd39a718e6d",
[
null,
{}
]
],
"2d.imageData.put.dirty.negative.worker.js": [
- "f228813f321415a597746bc220491412c8cbd870",
+ "0a7af6404925e333fb9e7318410612c629f5d6a4",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.html",
{}
]
],
"2d.imageData.put.dirty.outside.html": [
- "3aa731d7fb3d49dbba95d5dfc81e796126327452",
+ "7b67ef225332eb50f78b511890a45d65049af8d8",
[
null,
{}
]
],
"2d.imageData.put.dirty.outside.worker.js": [
- "d1993a44803b8edf7f3d9ddaf1b03f85921c8d58",
+ "87b88a09f4e97b0bc219ed9d1bf033998ba09772",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.html",
{}
]
],
"2d.imageData.put.dirty.rect1.html": [
- "17a14cfe9e11a4b6d89c7f66296a3ee4442187cc",
+ "9f571427a87d9a19e3bc7c13c40d69cb9cad68ab",
[
null,
{}
]
],
"2d.imageData.put.dirty.rect1.worker.js": [
- "d694e2ef435eecb1709e94fc2a3e0880fa8662c8",
+ "6feea9556de97a75a86bf5a708fbff3d61018d70",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.html",
{}
]
],
"2d.imageData.put.dirty.rect2.html": [
- "df1f6fe039257894873732568d17fbe9c4e09ad3",
+ "997c1136a1af4068d6a3a7f65c8b4a1408f67669",
[
null,
{}
]
],
"2d.imageData.put.dirty.rect2.worker.js": [
- "6652b1a93071971ab174210f9330f23e88c5dd44",
+ "752a3cdf1e10daeba9bd1e40f35da9364dc7fc50",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.html",
{}
]
],
"2d.imageData.put.dirty.zero.html": [
- "2e6462895c43d86820d2824abf5850ed5bedb886",
+ "fb90a017e1c3c14e37e48782bdba52d1c1c89d5f",
[
null,
{}
]
],
"2d.imageData.put.dirty.zero.worker.js": [
- "db09379c624ab4030a52343dc37e4766fcb51c44",
+ "2fa474c07f7e6495770b8751fe9ee448daaa3d77",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.html",
{}
]
],
"2d.imageData.put.modified.html": [
- "04f64600cd6d71f9f788453fb05499dd3e870bc8",
+ "337701aaf5a48b41d9329e3a21052d277061d96c",
[
null,
{}
]
],
"2d.imageData.put.modified.worker.js": [
- "b238d56cf967326fd8710c09e987514e369b7908",
+ "846a9dbc2dffd748262dae38c6b113cc83749613",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.html",
{}
]
],
"2d.imageData.put.nonfinite.html": [
- "c8f322c2f03b689964b59ee794d2bc8757cadbca",
+ "eb61d38e9ef025dfd740d63471cdcffbb03fd073",
[
null,
{}
]
],
"2d.imageData.put.nonfinite.worker.js": [
- "c63d66f0dc709c1051ea7aaabd97fdba4927b7bd",
+ "479ad69467cf7dfcf75b42c9d6a0bd01820b7857",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.html",
{}
]
],
"2d.imageData.put.null.html": [
- "82eb5c28b66bf7cf48060c08d530757196d3d5a8",
+ "89fe06686d2a3eb1c9d1492113b6e7c1981a14e4",
[
null,
{}
]
],
"2d.imageData.put.null.worker.js": [
- "0b5b746ba0f1c92a30996ab4b2b1f233bc0a9d03",
+ "2f021b638e7a1bf17f2dc6a9f961ea943753e16f",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.html",
{}
]
],
"2d.imageData.put.path.html": [
- "8d63a4287d2ac2b4857b3786708bfee26eac349b",
+ "6c32376006087eb45b110bf1451328387f38bdc3",
[
null,
{}
]
],
"2d.imageData.put.path.worker.js": [
- "81bd03eb4f25ffca31769a461d33535f25706694",
+ "66781a922d9bc3e13ae4394d8361e01c16f4462c",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.html",
{}
]
],
"2d.imageData.put.unaffected.html": [
- "048818fdba57561830c972f5606cbf6604a87f21",
+ "3d3e99b1356589952c8cbb0851a7de7b707720f6",
[
null,
{}
]
],
"2d.imageData.put.unaffected.worker.js": [
- "9b931717f0a6662974a9a4ac048d7589b7f39803",
+ "75adb865ef9167c05fe0d04ea3cae39ca2e347a0",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.html",
{}
]
],
"2d.imageData.put.unchanged.html": [
- "cab36f19e1e91977f2669ee42e09e4612700394f",
+ "d78fa4e035714bbe4da26ca1d140a84b5a911980",
[
null,
{}
]
],
"2d.imageData.put.unchanged.worker.js": [
- "07f4362f43c36db32d2b70480117faebb540394d",
+ "5e9362fab28cacdaaf5a9030d21d1bf45599fe7d",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.html",
{}
]
],
"2d.imageData.put.wrongtype.html": [
- "d726d5f968484fd3e392aca8357bbd4ef1655011",
+ "1488e7b111d147719c8f450c40fae048f6feea0f",
[
null,
{}
]
],
"2d.imageData.put.wrongtype.worker.js": [
- "9c58133ac9650ed7dd4c09db38611a46948be295",
+ "bf4d6dfedf9e1cc09f98b932bfd315e2eb6aa4b5",
[
"html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.html",
{}
@@ -599975,308 +601107,308 @@
},
"transformations": {
"2d.transformation.order.html": [
- "83815f367b7adbbcf54eada88a67753f38d124fe",
+ "d438c274338886941fd28d302316eca646a29349",
[
null,
{}
]
],
"2d.transformation.order.worker.js": [
- "d00fe230efb9659cc84f71605d8dea709a54acd6",
+ "219cbe84211c1c27fcc820c91cf7fe4261c46b5a",
[
"html/canvas/offscreen/transformations/2d.transformation.order.worker.html",
{}
]
],
"2d.transformation.rotate.direction.html": [
- "c20608f81c87eca1485f1724ac3c9ebbc4bb9037",
+ "fb0f29506211562a64fd666b2b4cd5feef01b090",
[
null,
{}
]
],
"2d.transformation.rotate.direction.worker.js": [
- "8506937583ee0329a1ed6753a024eadbd608bee4",
+ "b92b7d83689852e42c1fc0e06942862758991c66",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.html",
{}
]
],
"2d.transformation.rotate.nonfinite.html": [
- "bbc294a24fef4bd800c4b13bcea624c7eb72f705",
+ "dbde38370dbfe89fd95192bb1e3bda7e265a7059",
[
null,
{}
]
],
"2d.transformation.rotate.nonfinite.worker.js": [
- "2c892a561b2e4d5a20739551a73ebb699c845a6f",
+ "52b6605e45bf56c69a801ceae6cc96dc22e74bc7",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.html",
{}
]
],
"2d.transformation.rotate.radians.html": [
- "75121e39d7fbd8255168d452396c5f2d45b9908b",
+ "28006028ca72092518aa74ce0fe3c2d0be1b6906",
[
null,
{}
]
],
"2d.transformation.rotate.radians.worker.js": [
- "8c2fdd8ab0811c8bf96abf0f42b2848aafd701f4",
+ "085169115604009efaa332bb50e0f78f03f68a05",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.html",
{}
]
],
"2d.transformation.rotate.wrap.html": [
- "1f9eb838c818f473a78e09bf4f5f41abc242d68c",
+ "aea14ceddfb17c12a54c04013f628eb61b320690",
[
null,
{}
]
],
"2d.transformation.rotate.wrap.worker.js": [
- "579a1b6dd687b052276ff19bfc5804879b386a6a",
+ "4d0c2f5b5d4e6559189600714413e10ee64467bf",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.html",
{}
]
],
"2d.transformation.rotate.wrapnegative.html": [
- "c06f6453155a7d84f5568f274432d75a6b877b91",
+ "7363007a4db44bb0343a3d1fe3b620f6260623ce",
[
null,
{}
]
],
"2d.transformation.rotate.wrapnegative.worker.js": [
- "cce91071210fcbcaa3214a60cbc27e97af86a51e",
+ "932ecf65125aa370e14b350e14388215798b5ee3",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.html",
{}
]
],
"2d.transformation.rotate.zero.html": [
- "0101fa27c5848c18ef66fd032f36c663e5cd907c",
+ "965d0e07682ac988315364af9b5810f051747a5c",
[
null,
{}
]
],
"2d.transformation.rotate.zero.worker.js": [
- "1ad0aa5985375c8737c7dc9518b14d9a0c054f7c",
+ "659c9fd7a0532324de19aa1bf627f89cdf4403b7",
[
"html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.html",
{}
]
],
"2d.transformation.scale.basic.html": [
- "5c70438ba16eb54f3109878080724a0275df75f4",
+ "d4063f7129e84d4dd1b65628634d7836bea62818",
[
null,
{}
]
],
"2d.transformation.scale.basic.worker.js": [
- "73be61007a5868aee8a573e309e2738cb244d5d6",
+ "5e79daf3f42c9c669a8bb57c1c5f79706eb0f648",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.html",
{}
]
],
"2d.transformation.scale.large.html": [
- "8974545500a128a02e45fe2a579e1cbc5dbb28a9",
+ "ae8f954a713e5d1fe41729b8e34b377c1e5cd774",
[
null,
{}
]
],
"2d.transformation.scale.large.worker.js": [
- "30af9631e6ccbdfe3f0f6b6ab52ce777f0774c2d",
+ "6d716277280267a2b56b505e1b0ec18b36efccb8",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.html",
{}
]
],
"2d.transformation.scale.multiple.html": [
- "b07acf15ce6ee9a7c837f75a24f8a75ef3e151bd",
+ "6a899d1dd6aa4eade8d6634d2f73ef49fba76f11",
[
null,
{}
]
],
"2d.transformation.scale.multiple.worker.js": [
- "267a7df9441e6fd7cfc95aae12e6a830b2064990",
+ "921e95aa721c860acc2c30f1bd26d64a99ec804b",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.html",
{}
]
],
"2d.transformation.scale.negative.html": [
- "b516c1154f4d8ff4d56352d19ffd68dc8d7784a6",
+ "68c5780332c0f0744cbe5691f390d8cc7ec86e7d",
[
null,
{}
]
],
"2d.transformation.scale.negative.worker.js": [
- "0e68f7e8d8ce8c1b5e03116128e3588713f87254",
+ "cb0f01c618f23e968f63b8690d6eff31a5498fc3",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.html",
{}
]
],
"2d.transformation.scale.nonfinite.html": [
- "3d9c75a0dc0200245ec34767a0e1257a49ae6e99",
+ "5fd95629c9fd2fb72e88615e2d19ce8cb31e8f3a",
[
null,
{}
]
],
"2d.transformation.scale.nonfinite.worker.js": [
- "67c5c104481ce86d046044c0692eb1f56e3b02c9",
+ "35f9c90e71cef4cfcc5ec2787e90b66f4bdbdfdd",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.html",
{}
]
],
"2d.transformation.scale.zero.html": [
- "4b664125c2271ea2ac069ad1cb924f727ffd2863",
+ "b4269bd14054ec2fdaf1e002c8b20223fb71ce96",
[
null,
{}
]
],
"2d.transformation.scale.zero.worker.js": [
- "dc52323bc23a74eff3ac37318e7db02dab7d8c18",
+ "9e90127cfed198c277f157c611fb4c15d7ea6f86",
[
"html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.html",
{}
]
],
"2d.transformation.setTransform.multiple.html": [
- "e28710858b1fe476643d1d597a463788942435a2",
+ "0395c561bf69ea88f704a9c1c6f19fcea226a227",
[
null,
{}
]
],
"2d.transformation.setTransform.multiple.worker.js": [
- "b6b004601fb6b4a363acca80dd7b4b0d54ef36b2",
+ "e3e6daf8784bdc41c878321772ab23172e42bd5d",
[
"html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.html",
{}
]
],
"2d.transformation.setTransform.nonfinite.html": [
- "03c1b74579f0638147a6f8ff14d31dc6bb034e56",
+ "474b20a10b002a336f1a537788212f094ea1044d",
[
null,
{}
]
],
"2d.transformation.setTransform.nonfinite.worker.js": [
- "bd48262ca7d3bc7a5ca87b545ef07c86f906542b",
+ "d99ea52deab6851f67ebd276f8b08f13576ab671",
[
"html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.html",
{}
]
],
"2d.transformation.setTransform.skewed.html": [
- "c49d9d8a29855fc29ed7fedf4e8209180dfd0d8d",
+ "2d24d61f4b0d91d0445c8e2698e9cd7ac4bec119",
[
null,
{}
]
],
"2d.transformation.setTransform.skewed.worker.js": [
- "6f4b4769b61cd2f2ae9d4156967b3dec4ffb5ca8",
+ "161f4087e53318cec07a766ea58e62a677dcaa73",
[
"html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.html",
{}
]
],
"2d.transformation.transform.identity.html": [
- "1efa306707c06c4e4ca8cd296cf8ad464bb6f8af",
+ "d88b3bc03c56a98d55e06e7d69ffb609f0e03507",
[
null,
{}
]
],
"2d.transformation.transform.identity.worker.js": [
- "51a11ee03ded65c2f7235ba02b9356c386874e09",
+ "67202628c677dc752b3a76ad3f07314f27de8730",
[
"html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.html",
{}
]
],
"2d.transformation.transform.multiply.html": [
- "05a1e7e5ead0af5d3b0ce215219dcb032a226e90",
+ "a7dfbe5f344da1626de2c998e08c45a7680a123a",
[
null,
{}
]
],
"2d.transformation.transform.multiply.worker.js": [
- "61a5f052dc722dcb2f4dbf6b6911081815e47781",
+ "aa89a7d8caafea8a077a8fadd11fb7ef0846e9c5",
[
"html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.html",
{}
]
],
"2d.transformation.transform.nonfinite.html": [
- "b81bda463bd3515346d1967bc4a081b0a171f29a",
+ "c4cd459c8bbaa48e095de9af9b76fa51050ada3b",
[
null,
{}
]
],
"2d.transformation.transform.nonfinite.worker.js": [
- "ee675151b3ab6210d022947fac799d193a7141d5",
+ "c96af44b59d59a4111d1acda7dd8385a3dcda91b",
[
"html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.html",
{}
]
],
"2d.transformation.transform.skewed.html": [
- "9cb6dfcc52e462a8974e484100c82e9c0fb3f993",
+ "2f3c0453e33fcf68c4e96fb62ad7474917ab944e",
[
null,
{}
]
],
"2d.transformation.transform.skewed.worker.js": [
- "638adc14c44c9b930bb9a9b6bd9f37af35b44e83",
+ "c7ebaf9a83274a4719a3d19311399fbbcd9d549f",
[
"html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.html",
{}
]
],
"2d.transformation.translate.basic.html": [
- "51a7527b5ccb82d4a41dc39cc20dae29fcc12b01",
+ "f68225c077658fba117c44c17e47eb3caba88a99",
[
null,
{}
]
],
"2d.transformation.translate.basic.worker.js": [
- "11e8bd897b4d73cdae7758009bdf16931ddd884c",
+ "f377ab8a48c1c82e7a60f10a2e114bb87790ace9",
[
"html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.html",
{}
]
],
"2d.transformation.translate.nonfinite.html": [
- "010b28f3c6a8ebb88285e67d06f5e071fbf67c26",
+ "ebab949b4cfec52512e57496d0678027a53079bc",
[
null,
{}
]
],
"2d.transformation.translate.nonfinite.worker.js": [
- "c3ff3a31a8c3fda8d5992c35a38b282aa35f7783",
+ "7ad6fce2ba3661936ec629388c165077a7cf3f59",
[
"html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.html",
{}
@@ -600285,28 +601417,28 @@
},
"wide-gamut-canvas": {
"2d.color.space.p3.to.p3.html": [
- "d307dbe96d91dec5e1bf99c470bda93cbacde693",
+ "e1391e9010e735c47182d35b0e56f38449eaa76c",
[
null,
{}
]
],
"2d.color.space.p3.to.p3.worker.js": [
- "c5242daab6ba314f5d63a4fe9b99b99d179fb191",
+ "844cd93f81348b4c089b4e8b567f3631f83c1d87",
[
"html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.html",
{}
]
],
"2d.color.space.p3.to.srgb.html": [
- "8427a752b09c343d720f1236bce810471fcd43f1",
+ "062874442106d360966568348374dbd58cca5f5f",
[
null,
{}
]
],
"2d.color.space.p3.to.srgb.worker.js": [
- "3f8fb4b289cf14b01b77855823b4283229c5dce2",
+ "619c59076da638d66beb848fe1fbd99c9ff31874",
[
"html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.html",
{}
@@ -604929,7 +606061,7 @@
"embedded-content": {
"the-img-element": {
"attr-img-fetchpriority.html": [
- "996aa4d1567d1548c805163f2c9ce30cd2008e47",
+ "40daf958705873e5ebceac85ac5a9430c8860ff0",
[
null,
{}
@@ -608127,7 +609259,7 @@
"scripting": {
"the-script-element": {
"attr-script-fetchpriority.html": [
- "8639d04d86aaa8d5275fee19fadab0e23d1a8583",
+ "738c9eab747cc176ac046ada02a1cd9817f42c4f",
[
null,
{}
@@ -615752,8 +616884,17 @@
{}
]
],
+ "selectmenu-disabled.tentative.html": [
+ "0fe722fdfed1921247ed295148ccbb4aa4718fca",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"selectmenu-events.tentative.html": [
- "7e572b5418c771b157038943a4db74f153f9ea8f",
+ "830daaabc386113af7f11f58c5aaa5efa9256110",
[
null,
{
@@ -615893,6 +617034,24 @@
{}
]
],
+ "selectmenu-tab-navigation.tentative.html": [
+ "3d583335ed1e51016cbffb6576bcbee67ee96bb4",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
+ "selectmenu-tabindex-order.tentative.html": [
+ "b4fa2a1e757f2c8eac1b5251e825bf08261412fc",
+ [
+ null,
+ {
+ "testdriver": true
+ }
+ ]
+ ],
"selectmenu-user-select.tentative.html": [
"dc6e2e230c04861fb9b931eed4d78bea501fa5e7",
[
@@ -616935,7 +618094,7 @@
]
],
"popover-attribute-all-elements.html": [
- "9ee659962b8997cca1813a26a068736c7d94699a",
+ "5a536f026ee96744c744eb98244cb3e06017d277",
[
null,
{
@@ -616945,7 +618104,7 @@
]
],
"popover-attribute-basic.html": [
- "335f817e75d8f90580ff86d0c4d99bdda20f673b",
+ "eab61407c8b38772059fb9dae2dfe33308138a1e",
[
null,
{
@@ -616970,6 +618129,13 @@
}
]
],
+ "popover-css-properties.tentative.html": [
+ "93d388b02b533f8e8719ef8a9b54293f45a5cffd",
+ [
+ null,
+ {}
+ ]
+ ],
"popover-dialog-initial-focus.html": [
"47b2252bf5f26bc5bd122b9e57035992da65855a",
[
@@ -616985,14 +618151,14 @@
]
],
"popover-events.html": [
- "4d58001f7ddeae31d2d00622a819115d7004b829",
+ "eb5b21b15e1666c188680b08278565fecc8f093b",
[
null,
{}
]
],
"popover-focus-2.html": [
- "5a7f5da8f7b52d47c7e09e984cb835465591a67d",
+ "be6923e604a18cef5b5f2150ec8345e62bebfbd5",
[
null,
{
@@ -617008,7 +618174,17 @@
]
],
"popover-focus.html": [
- "915a1bcade3279de506dba251b1afeabe0cee929",
+ "df7c046e003a8e70481e124e6441e246043970cd",
+ [
+ null,
+ {
+ "testdriver": true,
+ "timeout": "long"
+ }
+ ]
+ ],
+ "popover-hover-hide.tentative.html": [
+ "ed647a7d7d8f9c2598cf2c69c21f84ec455f5994",
[
null,
{
@@ -617018,7 +618194,7 @@
]
],
"popover-invoker-reset.html": [
- "4b1ac6b588f70398e01de389bd0ab7c2bd305469",
+ "bfc79fd629171606b5d5d9a4224522e4bb4137ef",
[
null,
{
@@ -617044,7 +618220,7 @@
]
],
"popover-light-dismiss.html": [
- "f913aaa357e7bea084f9b4c19d16c3e2b98e9363",
+ "4411d0b7e381b95960d25a5fbbda7682af1db263",
[
null,
{
@@ -617061,7 +618237,7 @@
]
],
"popover-not-keyboard-focusable.html": [
- "5246073c960180fb92d411fe45f7e60d7c11babc",
+ "55c70aa643e0b1302024d55ee8f19d09815d7401",
[
null,
{
@@ -617104,6 +618280,16 @@
{}
]
],
+ "popover-target-action-hover.tentative.html": [
+ "b03ec78ebf12e49775bf0636c78a803d97a1c19d",
+ [
+ null,
+ {
+ "testdriver": true,
+ "timeout": "long"
+ }
+ ]
+ ],
"popover-target-element-disabled.html": [
"d5c951768c083aa0fea3c6d473c9a370f386f31b",
[
@@ -617130,14 +618316,14 @@
]
],
"popover-types-with-hints.tentative.html": [
- "06282a2aa1f5595e2a2be281dce57f52d26f405d",
+ "7a73efb50fc8e54926ffb4eb78c79f75413b1273",
[
null,
{}
]
],
"popover-types.html": [
- "e6d7d967bbc9c1b01b402e7f8a81d92efe269513",
+ "d4ad81e52bf1fcfae93237bfc7d8d180715b038e",
[
null,
{}
@@ -621568,7 +622754,7 @@
},
"the-link-element": {
"attr-link-fetchpriority.html": [
- "32c318b7605c2bd92ef59fdd27137fe3dd48d0f5",
+ "8aa515fa4c227066c097b99bf24d42e3e2778488",
[
null,
{}
@@ -622252,7 +623438,7 @@
]
],
"html5lib_tables01.html": [
- "a22bfe0b2b2e16fb1d9b6366ed538ad213659948",
+ "bcc8a949380734f5d1a0bf5a6fd0525cad51b691",
[
"html/syntax/parsing/html5lib_tables01.html?run_type=uri",
{
@@ -622840,7 +624026,7 @@
]
],
"html5lib_webkit02.html": [
- "5c9bf4efc868de50af3c50ac9ed964572f1545de",
+ "51900fa54a29fe540a0b97c3131486a80792ab25",
[
"html/syntax/parsing/html5lib_webkit02.html?run_type=uri",
{
@@ -626765,7 +627951,7 @@
]
},
"roles.html": [
- "c5cb3e35487de534ddfecd04e0feafb369a0f3a0",
+ "5144fe3f0fbc51c02e642455c0446f1c3c9583bf",
[
null,
{
@@ -632015,7 +633201,7 @@
]
],
"idlharness.window.js": [
- "fd9a3f042f6c9fc3ac605fc0dd4e23edfa5d683b",
+ "af2e622197148291d3efd9aa3f32802afd65f3aa",
[
"longtask-timing/idlharness.window.html",
{
@@ -632067,6 +633253,13 @@
}
]
],
+ "longtask-detach-frame.html": [
+ "94d0ad18f94ee090fe8bce10ef552cb55192bee7",
+ [
+ null,
+ {}
+ ]
+ ],
"longtask-in-childiframe-crossorigin.html": [
"b8607f90dd6363b5034cded2cf5ca2d357e2bd1b",
[
@@ -632116,6 +633309,13 @@
{}
]
],
+ "longtask-promise.html": [
+ "762511524bfe4420c2d5cd7292989f4ec72da8f8",
+ [
+ null,
+ {}
+ ]
+ ],
"longtask-sync-xhr.html": [
"da223cca2aef4c67760160ad9b82a61716747bb3",
[
@@ -662913,7 +664113,7 @@
]
],
"animation-timeline-view-functional-notation.tentative.html": [
- "70891c6ccf8a3aae43e44bdea2655b8969ef8a50",
+ "745d76c72943b4316fd074d8537e41ea82b3d0e2",
[
null,
{}
@@ -662948,7 +664148,7 @@
]
],
"progress-based-animation-timeline.html": [
- "3f1aeed0ae9bdd6f19550cab37f92f1437619634",
+ "eeb1e548e52a3df81df4c3f660c8d362fe1bea76",
[
null,
{}
@@ -663151,7 +664351,7 @@
]
],
"view-timeline-animation.html": [
- "73189b85917314e497cf0cb70d2e22986c230997",
+ "a367ef9dd879544e1fc0ad6f850661c86d2ea8e2",
[
null,
{}
@@ -663193,7 +664393,7 @@
]
],
"view-timeline-dynamic.html": [
- "76a30ad56603771c67b2325d2e13aed4a654b658",
+ "207c8c4e22379e19cf2f557d89295e34178e0a5b",
[
null,
{}
@@ -663228,7 +664428,7 @@
]
],
"view-timeline-lookup.html": [
- "b8a5b0008be1a0b9285fd52b3ecd666f39ab6a3e",
+ "6cead9dc586697428c21d1f3fcca9c7b047f4a7d",
[
null,
{}
@@ -668091,7 +669291,7 @@
]
],
"navigation-timing.https.html": [
- "6b51a5c2da213eb27cf0d9fd401b7c49b5349950",
+ "75cab40458c6d362caa34315388ad762fbb7d2e9",
[
null,
{}
@@ -668175,7 +669375,7 @@
]
],
"partitioned-cookies.tentative.https.html": [
- "6744edc0eac6df3f618f4b5568686b8695a54889",
+ "ab667013a2b7f5fa71a575e985a3c54b9ae4cc93",
[
null,
{
@@ -669414,24 +670614,6 @@
}
]
],
- "focus-navigation-scroller-delegatesFocus.html": [
- "5fc4f84a7b974f2b9f825b801a795d80cb9fa491",
- [
- null,
- {
- "testdriver": true
- }
- ]
- ],
- "focus-navigation-scroller-tabindex.html": [
- "0b5b66eb48d315f1a9365bd2a4e38f90adfda01a",
- [
- null,
- {
- "testdriver": true
- }
- ]
- ],
"focus-navigation-slot-fallback-default-tabindex.html": [
"e8e0293e77bd28aba469bccffcb8d6c4245a7691",
[
@@ -671273,7 +672455,7 @@
]
],
"document-rules.https.html": [
- "eb8170923dc74e17c30f9b688cba524a229f4118",
+ "701987c4318befe86d40890dacf31bf2051ed402",
[
"speculation-rules/prefetch/document-rules.https.html?include=and",
{}
@@ -671287,6 +672469,10 @@
{}
],
[
+ "speculation-rules/prefetch/document-rules.https.html?include=immediateMutation",
+ {}
+ ],
+ [
"speculation-rules/prefetch/document-rules.https.html?include=invalidPredicate",
{}
],
@@ -672833,7 +674019,7 @@
"storage": {
"buckets": {
"buckets_storage_policy.tentative.https.any.js": [
- "d6dce3675d0bca18a379518c6ecf2c7ec1310930",
+ "a66fd81cd4394209d1c534322b2b150cac35adf6",
[
"storage/buckets/buckets_storage_policy.tentative.https.any.html",
{
@@ -672913,7 +674099,7 @@
]
},
"estimate-indexeddb.https.any.js": [
- "b0c6b944dd6ff83a00b38cac6d6c4e3ea8424979",
+ "f0b82b9fa09fb1ef7000e398fb0fdb034504a008",
[
"storage/estimate-indexeddb.https.any.html",
{
@@ -672921,6 +674107,10 @@
[
"title",
"StorageManager: estimate() for indexeddb"
+ ],
+ [
+ "script",
+ "/storage/buckets/resources/util.js"
]
]
}
@@ -672932,6 +674122,10 @@
[
"title",
"StorageManager: estimate() for indexeddb"
+ ],
+ [
+ "script",
+ "/storage/buckets/resources/util.js"
]
]
}
@@ -685096,7 +686290,7 @@
]
],
"urlsearchparams-delete.any.js": [
- "28ebbce5f13bd8de759a4a1c623e7a36a0e309df",
+ "f9c623b90b175d8811ed7ce3a6bc5e569a730ad7",
[
"url/urlsearchparams-delete.any.html",
{}
@@ -685140,7 +686334,7 @@
]
],
"urlsearchparams-has.any.js": [
- "673dce77dc44ab6f78bf713d196c0ea5b588a28d",
+ "54cbf286db4a3d21fb764a1c93b7a16d34c47486",
[
"url/urlsearchparams-has.any.html",
{}
@@ -699969,7 +701163,7 @@
},
"webmidi": {
"idlharness.https.window.js": [
- "fabc836fdba582bcd72080da77c7cdd82d20fc82",
+ "8fbd6a903c462948c7b7cc61c5cb3f5c11605a90",
[
"webmidi/idlharness.https.window.html",
{
@@ -699983,6 +701177,14 @@
"/resources/idlharness.js"
],
[
+ "script",
+ "/resources/testdriver.js"
+ ],
+ [
+ "script",
+ "/resources/testdriver-vendor.js"
+ ],
+ [
"timeout",
"long"
]
@@ -716237,7 +717439,7 @@
]
],
"streams-echo.https.any.js": [
- "3b402d00e08aa0b7b746248835faed37b9b99578",
+ "703318d0e7020af468dc3f4996b1cede78ba9258",
[
"webtransport/streams-echo.https.any.html",
{
@@ -745130,13 +746332,6 @@
null,
{}
]
- ],
- "table-child-percentage-height-with-border-box-expected.html": [
- "b9d2418b18b5d7d604b8846a09e917903cc12aa2",
- [
- null,
- {}
- ]
]
},
"css-text": {
@@ -747610,14 +748805,14 @@
"log": {
"entry_added": {
"console.py": [
- "b66057eec004164028a4e254aef352b1ae7a098b",
+ "0105f4dfe31de889cc1181d9682c41df8d804b32",
[
null,
{}
]
],
"console_args.py": [
- "857d9f7b17e56567cd9d207f4e373a38b5960b24",
+ "c7c12d160c431f609b968d3bb45dfcb95d759419",
[
null,
{}
@@ -747637,6 +748832,13 @@
{}
]
],
+ "realm.py": [
+ "bcfc2eafec334f2674758762f48fede5c5b45d77",
+ [
+ null,
+ {}
+ ]
+ ],
"stacktrace.py": [
"d226476ef7d54d5ea92cf461cc9e84611eaca7fb",
[
diff --git a/tests/wpt/metadata/css/css-color/color-mix-currentcolor-003.html.ini b/tests/wpt/metadata/css/css-color/color-mix-currentcolor-003.html.ini
new file mode 100644
index 00000000000..b61a5a16f2a
--- /dev/null
+++ b/tests/wpt/metadata/css/css-color/color-mix-currentcolor-003.html.ini
@@ -0,0 +1,2 @@
+[color-mix-currentcolor-003.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini b/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini
index 645e5380333..208aeeba2c0 100644
--- a/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini
+++ b/tests/wpt/metadata/css/css-flexbox/parsing/flex-flow-valid.html.ini
@@ -4,3 +4,6 @@
[e.style['flex-flow'\] = "nowrap column" should set the property value]
expected: FAIL
+
+ [e.style['flex-flow'\] = "nowrap" should set the property value]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-2.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-2.html.ini
deleted file mode 100644
index 722e601f6eb..00000000000
--- a/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering-2.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[image-set-negative-resolution-rendering-2.html]
- expected: FAIL
diff --git a/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering.html.ini b/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering.html.ini
deleted file mode 100644
index a5b715bce70..00000000000
--- a/tests/wpt/metadata/css/css-images/image-set/image-set-negative-resolution-rendering.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[image-set-negative-resolution-rendering.html]
- expected: FAIL
diff --git a/tests/wpt/metadata/css/css-text/white-space/trailing-other-space-separators-break-spaces-011.html.ini b/tests/wpt/metadata/css/css-text/white-space/trailing-other-space-separators-break-spaces-011.html.ini
new file mode 100644
index 00000000000..6c3db7901f3
--- /dev/null
+++ b/tests/wpt/metadata/css/css-text/white-space/trailing-other-space-separators-break-spaces-011.html.ini
@@ -0,0 +1,2 @@
+[trailing-other-space-separators-break-spaces-011.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-values/calc-infinity-nan-computed.html.ini b/tests/wpt/metadata/css/css-values/calc-infinity-nan-computed.html.ini
index f1c17a32e8c..f07c9e0e517 100644
--- a/tests/wpt/metadata/css/css-values/calc-infinity-nan-computed.html.ini
+++ b/tests/wpt/metadata/css/css-values/calc-infinity-nan-computed.html.ini
@@ -142,3 +142,9 @@
[Property rotate(calc(NaN * 1grad)) value expected same with rotate(0deg) in +/-0.0001]
expected: FAIL
+
+ [Property width value 'calc(NaN * 1%)']
+ expected: FAIL
+
+ [Property width value 'calc(infinity * 1%)']
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-length.html.ini b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-length.html.ini
index 6dc11be38bb..030e7ef80a7 100644
--- a/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-length.html.ini
+++ b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-length.html.ini
@@ -112,3 +112,12 @@
['calc(1 * clamp(NaN * 2em, NaN * 4px, NaN * 8pt))' as a specified value should serialize as 'clamp(NaN * 1em, NaN * 1px, NaN * 1px)'.]
expected: FAIL
+
+ ['calc(1% * NaN)' as a specified value should serialize as 'calc(NaN * 1%)'.]
+ expected: FAIL
+
+ ['calc(1% * infinity)' as a specified value should serialize as 'calc(infinity * 1%)'.]
+ expected: FAIL
+
+ ['calc(1% * -infinity)' as a specified value should serialize as 'calc(-infinity * 1%)'.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-resolution.html.ini b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-resolution.html.ini
index e58a0d25026..97b2bff07be 100644
--- a/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-resolution.html.ini
+++ b/tests/wpt/metadata/css/css-values/calc-infinity-nan-serialize-resolution.html.ini
@@ -85,3 +85,6 @@
['image-set(url("") calc(1dppx * clamp(-inFinity, infinity, 10)))' as a specified value should serialize as 'image-set(url("") calc(10dppx))'.]
expected: FAIL
+
+ ['image-set(url("") calc(1 * clamp(-INFINITY*20dppx, 0dppx, infiniTY*10dppx)))' as a specified value should serialize as 'image-set(url("") calc(0dppx))'.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html.ini b/tests/wpt/metadata/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html.ini
new file mode 100644
index 00000000000..14c28753235
--- /dev/null
+++ b/tests/wpt/metadata/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html.ini
@@ -0,0 +1,12 @@
+[ShadowRoot-innerHTML-upgrade.tentative.html]
+ [Upgrade into autonomous custom element when inserted via innerHTML]
+ expected: FAIL
+
+ [Upgrade into autonomous custom element when definition is added]
+ expected: FAIL
+
+ [Upgrade into customized built-in element when inserted via innerHTML]
+ expected: FAIL
+
+ [Upgrade into customized built-in element when definition is added]
+ expected: FAIL
diff --git a/tests/wpt/metadata/custom-elements/scoped-registry/constructor-call.tentative.html.ini b/tests/wpt/metadata/custom-elements/scoped-registry/constructor-call.tentative.html.ini
new file mode 100644
index 00000000000..ff5133e8e77
--- /dev/null
+++ b/tests/wpt/metadata/custom-elements/scoped-registry/constructor-call.tentative.html.ini
@@ -0,0 +1,6 @@
+[constructor-call.tentative.html]
+ [Calling custom element constructor directly without global registration should fail]
+ expected: FAIL
+
+ [Calling custom element constructor directly uses global registration only]
+ expected: FAIL
diff --git a/tests/wpt/metadata/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html.ini b/tests/wpt/metadata/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html.ini
new file mode 100644
index 00000000000..5a9fc287227
--- /dev/null
+++ b/tests/wpt/metadata/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html.ini
@@ -0,0 +1,12 @@
+[constructor-reentry-with-different-definition.tentative.html]
+ [Re-entry via upgrade before calling super()]
+ expected: FAIL
+
+ [Re-entry via upgrade after calling super()]
+ expected: FAIL
+
+ [Re-entry via direct constructor call before calling super()]
+ expected: FAIL
+
+ [Re-entry via direct constructor call after calling super()]
+ expected: FAIL
diff --git a/tests/wpt/metadata/dom/abort/abort-signal-any.any.js.ini b/tests/wpt/metadata/dom/abort/abort-signal-any.any.js.ini
new file mode 100644
index 00000000000..f1013fd736d
--- /dev/null
+++ b/tests/wpt/metadata/dom/abort/abort-signal-any.any.js.ini
@@ -0,0 +1,5 @@
+[abort-signal-any.any.worker.html]
+ expected: ERROR
+
+[abort-signal-any.any.html]
+ expected: ERROR
diff --git a/tests/wpt/metadata/dom/abort/abort-signal-any.tentative.any.js.ini b/tests/wpt/metadata/dom/abort/abort-signal-any.tentative.any.js.ini
deleted file mode 100644
index 3a0ce1c9b13..00000000000
--- a/tests/wpt/metadata/dom/abort/abort-signal-any.tentative.any.js.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-[abort-signal-any.tentative.any.html]
- expected: ERROR
-
-[abort-signal-any.tentative.any.worker.html]
- expected: ERROR
diff --git a/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini b/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini
index e9ab91fc80e..4c1c78640bb 100644
--- a/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini
+++ b/tests/wpt/metadata/fetch/api/basic/keepalive.any.js.ini
@@ -1,3 +1,4 @@
[keepalive.any.html]
+ expected: TIMEOUT
[keepalive in onunload in nested frame in another window]
expected: FAIL
diff --git a/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini b/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini
index 361838941f2..b6675b938ea 100644
--- a/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini
+++ b/tests/wpt/metadata/fetch/local-network-access/iframe.tentative.https.window.js.ini
@@ -31,7 +31,10 @@
expected: FAIL
[public to local, grandparent navigates: failure.]
- expected: FAIL
+ expected: TIMEOUT
[public to local, grandparent navigates: success.]
expected: TIMEOUT
+
+ [local to local, grandparent navigates: no preflight required.]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini
index f9de5391ad6..aa6caedd473 100644
--- a/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini
+++ b/tests/wpt/metadata/fetch/metadata/generated/css-images.sub.tentative.html.ini
@@ -146,3 +146,6 @@
[list-style-image sec-fetch-site - HTTPS downgrade-upgrade]
expected: FAIL
+
+ [background-image sec-fetch-dest - Not sent to non-trustworthy same-site destination]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini
new file mode 100644
index 00000000000..3e07e6b7d1f
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/empty-iframe-load-event.html.ini
@@ -0,0 +1,6 @@
+[empty-iframe-load-event.html]
+ [Check execution order from nested timeout]
+ expected: FAIL
+
+ [Check execution order on load handler]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini
index 1bca09f21d6..c5fc1407992 100644
--- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/initial-empty-document/iframe-src-aboutblank-navigate-immediately.html.ini
@@ -1,4 +1,5 @@
[iframe-src-aboutblank-navigate-immediately.html]
+ expected: TIMEOUT
[Navigating to a different document with window.open]
expected: FAIL
@@ -6,4 +7,4 @@
expected: FAIL
[Navigating to a different document with form submission]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini
index abd95eec1fd..e91aac214b4 100644
--- a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/javascript-url-no-beforeunload.window.js.ini
@@ -4,7 +4,16 @@
expected: NOTRUN
[Navigating an opened window with an iframe via location.href to a javascript: URL must not fire beforeunload on the iframe: undefined completion]
- expected: FAIL
+ expected: NOTRUN
[Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: string completion]
+ expected: NOTRUN
+
+ [Navigating an opened window via location.href to a javascript: URL must not fire beforeunload: undefined completion]
expected: TIMEOUT
+
+ [Navigating an iframe via location.href to a javascript: URL must not fire beforeunload: string completion]
+ expected: NOTRUN
+
+ [Navigating an iframe via src="" to a javascript: URL after insertion must not fire beforeunload: string completion]
+ expected: NOTRUN
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini
new file mode 100644
index 00000000000..49cc2e16746
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin-fragment.html.ini
@@ -0,0 +1,3 @@
+[navigation-unload-same-origin-fragment.html]
+ [Tests that a fragment navigation in the unload handler will not block the initial navigation]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini
new file mode 100644
index 00000000000..7dc346632a4
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/navigation-unload-same-origin.window.js.ini
@@ -0,0 +1,3 @@
+[navigation-unload-same-origin.window.html]
+ [Same-origin navigation started from unload handler must be ignored]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini
new file mode 100644
index 00000000000..60a4fa51f8a
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/browsing-the-web/navigating-across-documents/replace-before-load/a-click.html.ini
@@ -0,0 +1,3 @@
+[a-click.html]
+ [aElement.click() before the load event must NOT replace]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini
deleted file mode 100644
index f5b7b25324f..00000000000
--- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse-during-unload.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[traverse-during-unload.html]
- expected: TIMEOUT
- [Traversing the history during unload]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini b/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
deleted file mode 100644
index ba0aed26689..00000000000
--- a/tests/wpt/metadata/html/browsers/history/the-history-interface/traverse_the_history_1.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[traverse_the_history_1.html]
- [Multiple history traversals from the same task]
- expected: FAIL
diff --git a/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini
new file mode 100644
index 00000000000..4b4820d1729
--- /dev/null
+++ b/tests/wpt/metadata/html/browsers/the-window-object/open-close/creating_browsing_context_test_01.html.ini
@@ -0,0 +1,3 @@
+[creating_browsing_context_test_01.html]
+ [first argument: absolute url]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.image.html.ini b/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.image.html.ini
new file mode 100644
index 00000000000..4106909f930
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.image.html.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.image.html]
+ [Canvas test: 2d.composite.globalAlpha.image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html.ini b/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html.ini
new file mode 100644
index 00000000000..37f671ec7c9
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.imagepattern.html]
+ [Canvas test: 2d.composite.globalAlpha.imagepattern]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html.ini
new file mode 100644
index 00000000000..57d0e4d4c17
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.3arg.html]
+ [Canvas test: 2d.drawImage.3arg]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html.ini
new file mode 100644
index 00000000000..055578bb2bb
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.5arg.html]
+ [Canvas test: 2d.drawImage.5arg]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini
new file mode 100644
index 00000000000..8c8262fe9b3
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.basic.html]
+ [Canvas test: 2d.drawImage.9arg.basic]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html.ini
new file mode 100644
index 00000000000..4ef67e9add4
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.destpos.html]
+ [Canvas test: 2d.drawImage.9arg.destpos]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html.ini
new file mode 100644
index 00000000000..e3902f95b70
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.destsize.html]
+ [Canvas test: 2d.drawImage.9arg.destsize]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini
new file mode 100644
index 00000000000..97f18d7b7eb
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcepos.html]
+ [Canvas test: 2d.drawImage.9arg.sourcepos]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini
new file mode 100644
index 00000000000..8f33a46ee0a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcesize.html]
+ [Canvas test: 2d.drawImage.9arg.sourcesize]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini
new file mode 100644
index 00000000000..2bc009ebb42
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.alpha.html]
+ [Canvas test: 2d.drawImage.alpha]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini
new file mode 100644
index 00000000000..c26cd20441d
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.animated.poster.html]
+ [drawImage() of an APNG draws the poster frame]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini
new file mode 100644
index 00000000000..ad847aff137
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.broken.html]
+ [Canvas test: 2d.drawImage.broken]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini
new file mode 100644
index 00000000000..0c586a506d8
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.clip.html]
+ [Canvas test: 2d.drawImage.clip]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini
new file mode 100644
index 00000000000..31af0c01885
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.composite.html]
+ [Canvas test: 2d.drawImage.composite]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini
new file mode 100644
index 00000000000..a4a278d3074
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.floatsource.html]
+ [Canvas test: 2d.drawImage.floatsource]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini
new file mode 100644
index 00000000000..e34bd0f1a35
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedest.html]
+ [Negative destination width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini
new file mode 100644
index 00000000000..f6aa16fcdb7
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedir.html]
+ [Negative dimensions do not affect the direction of the image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini
new file mode 100644
index 00000000000..5d0c5af3319
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativesource.html]
+ [Negative source width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini
new file mode 100644
index 00000000000..84de956bfcb
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nonfinite.html]
+ [drawImage() with Infinity/NaN is ignored]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini
new file mode 100644
index 00000000000..e437a21fb7d
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nowrap.html]
+ [Stretched images do not get pixels wrapping around the edges]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html.ini
new file mode 100644
index 00000000000..e98d714b3c0
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.path.html]
+ [Canvas test: 2d.drawImage.path]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html.ini
new file mode 100644
index 00000000000..6879b65b152
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.svg.html]
+ [drawImage() of an SVG image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini
new file mode 100644
index 00000000000..b4589f0790a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.transform.html]
+ [Canvas test: 2d.drawImage.transform]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini
new file mode 100644
index 00000000000..77600d93fd6
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.zerosource.html]
+ [drawImage with zero-sized source rectangle draws nothing without exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini
index bea609ed103..f6d26305495 100644
--- a/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini
+++ b/tests/wpt/metadata/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html.ini
@@ -1,3 +1,6 @@
[2d.drawImage.zerosource.image.html]
[drawImage with zero-sized source rectangle from image throws INDEX_SIZE_ERR]
expected: FAIL
+
+ [drawImage with zero-sized source rectangle from image draws nothing without exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini b/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini
new file mode 100644
index 00000000000..77ea4e129ba
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html.ini
@@ -0,0 +1,3 @@
+[drawimage_zerosize-image.html]
+ [drawImage with zero-sized source rectangle from image draws nothing without exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html.ini b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html.ini
new file mode 100644
index 00000000000..844abdcced8
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.image.html]
+ [OffscreenCanvas test: 2d.composite.globalAlpha.image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js.ini
new file mode 100644
index 00000000000..a66bd4c9607
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.image.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html.ini b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html.ini
new file mode 100644
index 00000000000..5dd24f42848
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.imagepattern.html]
+ [OffscreenCanvas test: 2d.composite.globalAlpha.imagepattern]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js.ini
new file mode 100644
index 00000000000..1718e787f1c
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.composite.globalAlpha.imagepattern.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html.ini b/tests/wpt/metadata/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html.ini
index 15ef6c1467d..d4431be4f1b 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html.ini
@@ -1,4 +1,3 @@
[2d.conformance.requirements.basics.html]
- expected: ERROR
[void methods return undefined]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini
new file mode 100644
index 00000000000..ed265d4511a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.basic.html]
+ [OffscreenCanvas test: 2d.drawImage.9arg.basic]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js.ini
new file mode 100644
index 00000000000..457a0c78e85
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.basic.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini
new file mode 100644
index 00000000000..d94b40f8d1a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcepos.html]
+ [OffscreenCanvas test: 2d.drawImage.9arg.sourcepos]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js.ini
new file mode 100644
index 00000000000..36091c46745
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcepos.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini
new file mode 100644
index 00000000000..bdf406a9423
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcesize.html]
+ [OffscreenCanvas test: 2d.drawImage.9arg.sourcesize]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js.ini
new file mode 100644
index 00000000000..54d67532897
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.9arg.sourcesize.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini
new file mode 100644
index 00000000000..c0c382ad41c
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.alpha.html]
+ [OffscreenCanvas test: 2d.drawImage.alpha]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js.ini
new file mode 100644
index 00000000000..aaf0fdee8c9
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.alpha.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini
new file mode 100644
index 00000000000..c26cd20441d
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.animated.poster.html]
+ [drawImage() of an APNG draws the poster frame]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini
new file mode 100644
index 00000000000..2c48d688b6a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.animated.poster.worker.html]
+ [drawImage() of an APNG draws the poster frame]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini
new file mode 100644
index 00000000000..247ebc98ddc
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.broken.html]
+ [OffscreenCanvas test: 2d.drawImage.broken]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js.ini
new file mode 100644
index 00000000000..f6cc520ffbe
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.broken.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini
new file mode 100644
index 00000000000..bf8fae7c02b
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.clip.html]
+ [OffscreenCanvas test: 2d.drawImage.clip]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js.ini
new file mode 100644
index 00000000000..5409b1250d4
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.clip.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini
new file mode 100644
index 00000000000..953133b8a6f
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.composite.html]
+ [OffscreenCanvas test: 2d.drawImage.composite]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js.ini
new file mode 100644
index 00000000000..189440aea71
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.composite.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini
new file mode 100644
index 00000000000..364870d5c28
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.floatsource.html]
+ [OffscreenCanvas test: 2d.drawImage.floatsource]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js.ini
new file mode 100644
index 00000000000..fccd49201ad
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.floatsource.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini
new file mode 100644
index 00000000000..e34bd0f1a35
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedest.html]
+ [Negative destination width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js.ini
new file mode 100644
index 00000000000..f238284c831
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedest.worker.html]
+ [Negative destination width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini
new file mode 100644
index 00000000000..f6aa16fcdb7
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedir.html]
+ [Negative dimensions do not affect the direction of the image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js.ini
new file mode 100644
index 00000000000..3f00629f099
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativedir.worker.html]
+ [Negative dimensions do not affect the direction of the image]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini
new file mode 100644
index 00000000000..5d0c5af3319
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativesource.html]
+ [Negative source width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js.ini
new file mode 100644
index 00000000000..c6b1875d3ea
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.negativesource.worker.html]
+ [Negative source width/height represents the correct rectangle]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini
new file mode 100644
index 00000000000..84de956bfcb
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nonfinite.html]
+ [drawImage() with Infinity/NaN is ignored]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js.ini
new file mode 100644
index 00000000000..0d07856826f
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nonfinite.worker.html]
+ [drawImage() with Infinity/NaN is ignored]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini
new file mode 100644
index 00000000000..e437a21fb7d
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nowrap.html]
+ [Stretched images do not get pixels wrapping around the edges]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js.ini
new file mode 100644
index 00000000000..560cd8b5d80
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.nowrap.worker.html]
+ [Stretched images do not get pixels wrapping around the edges]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html.ini
new file mode 100644
index 00000000000..57a3a0dd057
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.path.html]
+ [OffscreenCanvas test: 2d.drawImage.path]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js.ini
new file mode 100644
index 00000000000..fa233df0719
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.path.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini
new file mode 100644
index 00000000000..840609b14b0
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.transform.html]
+ [OffscreenCanvas test: 2d.drawImage.transform]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js.ini
new file mode 100644
index 00000000000..a98078f49f9
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.drawImage.transform.worker.html]
+ [2d]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini
index d6114b0db21..ba4ec7acec4 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html.ini
@@ -1,3 +1,6 @@
[2d.drawImage.zerosource.html]
[drawImage with zero-sized source rectangle throws INDEX_SIZE_ERR]
expected: FAIL
+
+ [drawImage with zero-sized source rectangle draws nothing without exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js.ini
index a7f8c7ee0ce..435eff743d6 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js.ini
@@ -1,3 +1,6 @@
[2d.drawImage.zerosource.worker.html]
[drawImage with zero-sized source rectangle throws INDEX_SIZE_ERR]
expected: FAIL
+
+ [drawImage with zero-sized source rectangle draws nothing without exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html.ini
index b573ace6569..219ab646393 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html.ini
@@ -1,4 +1,3 @@
[2d.fillRect.shadow.html]
- expected: ERROR
[fillRect draws shadows]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html.ini b/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html.ini
index 2a1e822043f..dc1c1d06c1a 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html.ini
@@ -1,4 +1,3 @@
[2d.strokeRect.shadow.html]
- expected: ERROR
[strokeRect draws shadows]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html.ini
index 5076fdc34a9..4451a7d8a32 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.blur.exceptions.tentative.html]
- expected: ERROR
[Test exceptions on CanvasFilter() blur.object]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html.ini
index 0d2c77b6eb8..61dafe7fce7 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.colorMatrix.tentative.html]
- expected: ERROR
[Test the functionality of ColorMatrix filters in CanvasFilter objects]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html.ini
index 56e4dc27b3b..8c7cb3e0057 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html]
- expected: ERROR
[Test pixels on CanvasFilter() componentTransfer with discrete type]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html.ini
index 9cf3fa0d1bb..53f59082097 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html]
- expected: ERROR
[Test pixels on CanvasFilter() componentTransfer with gamma type]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html.ini
index d709e2ffbbc..aebe150b830 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html]
- expected: ERROR
[Test pixels on CanvasFilter() componentTransfer with identity type]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html.ini
index f0f9c944cdf..4057e21a548 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html]
- expected: ERROR
[Test pixels on CanvasFilter() componentTransfer with linear type]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html.ini
index a6e2e3fc654..19140a3824d 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.componentTransfer.table.tentative.html]
- expected: ERROR
[Test pixels on CanvasFilter() componentTransfer with table type]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html.ini
index c2c7d4032c4..a320e4cfcb4 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html]
- expected: ERROR
[Test exceptions on CanvasFilter() convolveMatrix]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html.ini
index 0c57ad668a1..335168c7f52 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html]
- expected: ERROR
[Test exceptions on CanvasFilter() dropShadow object]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html.ini
index 5870bdd7a33..55f19cf5246 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.tentative.html]
- expected: ERROR
[Test CanvasFilter() object]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html.ini
index a7abaf5ac56..7b14ef25b2d 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html.ini
@@ -1,4 +1,3 @@
[2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html]
- expected: ERROR
[Test exceptions on CanvasFilter() turbulence object]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.value.html.ini b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.value.html.ini
index ee935234162..51650ad4d05 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.value.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/filters/2d.filter.value.html.ini
@@ -1,4 +1,3 @@
[2d.filter.value.html]
- expected: ERROR
[test if ctx.filter works correctly]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html.ini
new file mode 100644
index 00000000000..ff559e5d888
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.alpha.blending.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html.ini
new file mode 100644
index 00000000000..c2a8c981f84
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.alpha.blending.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html.ini
new file mode 100644
index 00000000000..aaa67652534
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.alpha.composite.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html.ini
new file mode 100644
index 00000000000..75d16614612
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.alpha.composite.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html.ini
deleted file mode 100644
index 9942cbaf0f2..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html.ini
deleted file mode 100644
index 7389a729032..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.alpha.filter.shadow.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html.ini
deleted file mode 100644
index 558b18cf58b..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.alpha.filter.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html.ini
new file mode 100644
index 00000000000..319d3a5bb35
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.blending.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html.ini
new file mode 100644
index 00000000000..ee82c17f0e8
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.blending.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html.ini
new file mode 100644
index 00000000000..ed51ae32199
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.composite.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html.ini
new file mode 100644
index 00000000000..8b69d019557
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.composite.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html.ini
new file mode 100644
index 00000000000..92cd7f4821f
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.blending.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html.ini
new file mode 100644
index 00000000000..b7a4f44aa77
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.blending.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html.ini
new file mode 100644
index 00000000000..fcb4853232b
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.composite.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html.ini
new file mode 100644
index 00000000000..a7455df4410
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.composite.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html.ini
new file mode 100644
index 00000000000..c3ef52e8b4b
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html.ini
new file mode 100644
index 00000000000..c080e874576
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.alpha.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html.ini
new file mode 100644
index 00000000000..bdd23993284
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.blending.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html.ini
new file mode 100644
index 00000000000..54369d7e0de
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.blending.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html.ini
new file mode 100644
index 00000000000..7315fffcb1b
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.composite.shadow.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html.ini
new file mode 100644
index 00000000000..87fe1c13382
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.composite.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html.ini
deleted file mode 100644
index 11fb743f0c9..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.filter.globalcompositeoperation.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html.ini
new file mode 100644
index 00000000000..84c5a0e63ce
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.filter.no-global-states.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html.ini
deleted file mode 100644
index c2355891e60..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.filter.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html.ini
deleted file mode 100644
index 6cf683385e0..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.globalcompositeoperation.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html.ini
new file mode 100644
index 00000000000..cc515060109
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html.ini
@@ -0,0 +1,2 @@
+[2d.layer.global-states.no-global-states.w.html]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html.ini b/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html.ini
deleted file mode 100644
index 889cd6eac8a..00000000000
--- a/tests/wpt/metadata/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html.ini
+++ /dev/null
@@ -1,2 +0,0 @@
-[2d.layer.global-states.no_global_states.w.html]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.html.ini
new file mode 100644
index 00000000000..01a9c8bbc6e
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.html.ini
@@ -0,0 +1,3 @@
+[2d.path.arc.negative.html]
+ [arc() with negative radius throws INDEX_SIZE_ERR]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js.ini
new file mode 100644
index 00000000000..46853e97f96
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.arc.negative.worker.html]
+ [arc() with negative radius throws INDEX_SIZE_ERR]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html.ini
new file mode 100644
index 00000000000..7af4f97ffde
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html.ini
@@ -0,0 +1,3 @@
+[2d.path.arcTo.negative.html]
+ [arcTo() with negative radius throws an exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js.ini
new file mode 100644
index 00000000000..806da764901
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.arcTo.negative.worker.html]
+ [arcTo() with negative radius throws an exception]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html.ini
new file mode 100644
index 00000000000..dc6f2c33a8d
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInPath.basic.html]
+ [Verify the winding rule in isPointInPath works for for rect path.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js.ini
new file mode 100644
index 00000000000..cb959f9455a
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInPath.basic.worker.html]
+ [Verify the winding rule in isPointInPath works for for rect path.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini
new file mode 100644
index 00000000000..21ac5da23e5
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInStroke.scaleddashes.html]
+ [isPointInStroke() should return correct results on dashed paths at high scale factors]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js.ini
new file mode 100644
index 00000000000..0d5d62e7220
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInStroke.scaleddashes.worker.html]
+ [isPointInStroke() should return correct results on dashed paths at high scale factors]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html.ini
new file mode 100644
index 00000000000..f81268e5c75
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInpath.invalid.html]
+ [Verify isPointInPath throws exceptions with invalid inputs.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js.ini
new file mode 100644
index 00000000000..a7ec32a9fbb
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInpath.invalid.worker.html]
+ [Verify isPointInPath throws exceptions with invalid inputs.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html.ini
new file mode 100644
index 00000000000..6267ee28a52
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInpath.multi.path.html]
+ [Verify the winding rule in isPointInPath works for path object.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js.ini
new file mode 100644
index 00000000000..43b5909c290
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.isPointInpath.multi.path.worker.html]
+ [Verify the winding rule in isPointInPath works for path object.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html.ini
index 798f7615a20..9865bfbc1db 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.1.radius.dompoint.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.]
expected: FAIL
+
+ [Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html.ini
new file mode 100644
index 00000000000..d35db031e54
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.dompoint.single argument.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js.ini
new file mode 100644
index 00000000000..f3aed6c669f
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.dompoint.single argument.worker.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js.ini
index 6625cf246f4..dc117f2b9fd 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.1.radius.dompoint.worker.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.]
expected: FAIL
+
+ [Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html.ini
index 89c4a8991d6..dce1856009e 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.1.radius.dompointinit.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html.ini
new file mode 100644
index 00000000000..0269be32e46
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.dompointinit.single.argument.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js.ini
new file mode 100644
index 00000000000..fbb43c6dd21
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.dompointinit.single.argument.worker.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js.ini
index d23a075fe00..41d1c632a4f 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.1.radius.dompointinit.worker.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html.ini
new file mode 100644
index 00000000000..2e79a42ef6c
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.double.single.argument.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js.ini
new file mode 100644
index 00000000000..95d3d37d95e
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.1.radius.double.single.argument.worker.html]
+ [Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html.ini
index b04b1dafdc3..43c434087eb 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.2.radii.1.dompointinit.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.]
expected: FAIL
+
+ [Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js.ini
index 9cd4df73d0f..dccd7601fe0 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.2.radii.1.dompointinit.worker.html]
[Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.]
expected: FAIL
+
+ [Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html.ini
index a39eec45229..6a8b17e3f3f 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.2.radii.2.dompointinit.html]
[Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js.ini
index 78769c2c3cf..5ce7269927d 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.2.radii.2.dompointinit.worker.html]
[Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html.ini
index 2f1791e6106..43c0c5b83a0 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.3.radii.2.dompointinit.html]
[Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js.ini
index e7648cf822a..21c0670e77e 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js.ini
@@ -1,3 +1,6 @@
[2d.path.roundrect.3.radii.2.dompointinit.worker.html]
[Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.]
expected: FAIL
+
+ [Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html.ini
new file mode 100644
index 00000000000..385cba424c0
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.badinput.html]
+ [roundRect() throws or does not throw errors given the strange inputs.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js.ini
new file mode 100644
index 00000000000..04c21ed9f42
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.badinput.worker.html]
+ [roundRect() throws or does not throw errors given the strange inputs.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html.ini
new file mode 100644
index 00000000000..7d1ab60ed93
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.radius.noargument.html]
+ [Check that roundRect draws a rectangle when no radii are provided.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js.ini b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js.ini
new file mode 100644
index 00000000000..9f3781320ed
--- /dev/null
+++ b/tests/wpt/metadata/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js.ini
@@ -0,0 +1,3 @@
+[2d.path.roundrect.radius.noargument.worker.html]
+ [Check that roundRect draws a rectangle when no radii are provided.]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html.ini b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html.ini
index f388c81dcb7..e7d458b3e2d 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html.ini
@@ -1,4 +1,3 @@
[2d.imageData.create2.nonfinite.html]
- expected: ERROR
[createImageData() throws TypeError if arguments are not finite]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html.ini b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html.ini
index b490d0c70e4..62da7a7f752 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html.ini
@@ -1,4 +1,3 @@
[2d.imageData.get.nonfinite.html]
- expected: ERROR
[getImageData() throws TypeError if arguments are not finite]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html.ini b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html.ini
index 7801ffc2beb..b1d97959896 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html.ini
@@ -1,4 +1,3 @@
[2d.imageData.get.source.outside.html]
- expected: ERROR
[getImageData() returns transparent black outside the canvas]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html.ini b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html.ini
index e96e8b3aecb..0b8dc1ad94d 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html.ini
@@ -1,4 +1,3 @@
[2d.imageData.put.nonfinite.html]
- expected: ERROR
[putImageData() throws TypeError if arguments are not finite]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html.ini b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html.ini
index acfa51e8949..124b05bd597 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html.ini
@@ -1,4 +1,3 @@
[2d.imageData.put.unchanged.html]
- expected: ERROR
[putImageData(getImageData(...), ...) has no effect]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.scale.large.html.ini b/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.scale.large.html.ini
index e6c27b72f74..d73c6ef0753 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.scale.large.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.scale.large.html.ini
@@ -1,4 +1,3 @@
[2d.transformation.scale.large.html]
- expected: ERROR
[scale() with large scale factors works]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html.ini b/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html.ini
index 951f84bb1b2..1a617141fac 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html.ini
@@ -1,4 +1,3 @@
[2d.transformation.setTransform.multiple.html]
- expected: ERROR
[OffscreenCanvas test: 2d.transformation.setTransform.multiple]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html.ini b/tests/wpt/metadata/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html.ini
index 3f898c695f7..c10a8cc7474 100644
--- a/tests/wpt/metadata/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html.ini
+++ b/tests/wpt/metadata/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html.ini
@@ -1,4 +1,3 @@
[2d.color.space.p3.to.p3.html]
- expected: ERROR
[test getImageData with display-p3 and uint8 from display p3 uint8 canvas]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
index add66c12f92..9b27c5c1957 100644
--- a/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
+++ b/tests/wpt/metadata/html/interaction/focus/the-autofocus-attribute/update-the-rendering.html.ini
@@ -1,6 +1,7 @@
[update-the-rendering.html]
+ expected: TIMEOUT
["Flush autofocus candidates" should be happen after the first animation frame callbacks, and before a resize event in the next iteration of window event loop.]
expected: TIMEOUT
["Flush autofocus candidates" should be happen before a scroll event and animation frame callbacks]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/rendering/widgets/input-checkbox-no-centering.html.ini b/tests/wpt/metadata/html/rendering/widgets/input-checkbox-no-centering.html.ini
new file mode 100644
index 00000000000..6ddd0214009
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/widgets/input-checkbox-no-centering.html.ini
@@ -0,0 +1,2 @@
+[input-checkbox-no-centering.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/rendering/widgets/input-radio-no-centering.html.ini b/tests/wpt/metadata/html/rendering/widgets/input-radio-no-centering.html.ini
new file mode 100644
index 00000000000..af60db96cb1
--- /dev/null
+++ b/tests/wpt/metadata/html/rendering/widgets/input-radio-no-centering.html.ini
@@ -0,0 +1,2 @@
+[input-radio-no-centering.html]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
index 2d3fbf0f308..25d9964f057 100644
--- a/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
+++ b/tests/wpt/metadata/html/semantics/embedded-content/the-iframe-element/iframe_sandbox_popups_escaping-1.html.ini
@@ -1,5 +1,4 @@
[iframe_sandbox_popups_escaping-1.html]
type: testharness
- expected: TIMEOUT
[Check that popups from a sandboxed iframe escape the sandbox if\n allow-popups-to-escape-sandbox is used]
- expected: TIMEOUT
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini
index 77d6f79dd05..5845ddee93e 100644
--- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini
+++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/multipart-formdata.window.js.ini
@@ -170,9 +170,6 @@
[multipart/form-data: backslash in value (formdata event)]
expected: FAIL
- [multipart/form-data: Basic test (formdata event)]
- expected: FAIL
-
[multipart/form-data: 0x00 in value (normal form)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini
new file mode 100644
index 00000000000..7682a4830bf
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/reparent-form-during-planned-navigation-task.html.ini
@@ -0,0 +1,4 @@
+[reparent-form-during-planned-navigation-task.html]
+ expected: TIMEOUT
+ [reparent-form-during-planned-navigation-task]
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/semantics/forms/form-submission-0/text-plain.window.js.ini b/tests/wpt/metadata/html/semantics/forms/form-submission-0/text-plain.window.js.ini
index c18ea160973..5df1d116577 100644
--- a/tests/wpt/metadata/html/semantics/forms/form-submission-0/text-plain.window.js.ini
+++ b/tests/wpt/metadata/html/semantics/forms/form-submission-0/text-plain.window.js.ini
@@ -173,9 +173,6 @@
[text/plain: 0x00 in name (formdata event)]
expected: FAIL
- [text/plain: Basic File test (formdata event)]
- expected: FAIL
-
[text/plain: 0x00 in value (formdata event)]
expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini b/tests/wpt/metadata/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini
index 071b4378add..6ba4d555845 100644
--- a/tests/wpt/metadata/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini
+++ b/tests/wpt/metadata/html/semantics/links/links-created-by-a-and-area-elements/htmlanchorelement_noopener.html.ini
@@ -1,5 +1,6 @@
[htmlanchorelement_noopener.html]
type: testharness
+ expected: TIMEOUT
[Check that targeting of rel=noopener with a given name ignores an existing window with that name]
expected: NOTRUN
@@ -7,7 +8,10 @@
expected: FAIL
[Check that rel=noopener with target=_top does a normal load]
- expected: FAIL
+ expected: NOTRUN
[Check that rel=noopener with target=_parent does a normal load]
expected: FAIL
+
+ [Check that rel=noopener with target=_self does a normal load]
+ expected: NOTRUN
diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-css-properties.tentative.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-css-properties.tentative.html.ini
new file mode 100644
index 00000000000..5fc3e9ddd42
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/popovers/popover-css-properties.tentative.html.ini
@@ -0,0 +1,198 @@
+[popover-css-properties.tentative.html]
+ [Property popover-show-delay value '0s']
+ expected: FAIL
+
+ [Property popover-show-delay value '0ms']
+ expected: FAIL
+
+ [Property popover-show-delay value '32s']
+ expected: FAIL
+
+ [Property popover-show-delay value '123ms']
+ expected: FAIL
+
+ [e.style['popover-show-delay'\] = "0s" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-show-delay'\] = "0ms" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-show-delay'\] = "32s" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-show-delay'\] = "123ms" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-show-delay'\] = "inherit" should set the property value]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-show-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [Property popover-hide-delay value '0s']
+ expected: FAIL
+
+ [Property popover-hide-delay value '0ms']
+ expected: FAIL
+
+ [Property popover-hide-delay value '32s']
+ expected: FAIL
+
+ [Property popover-hide-delay value '123ms']
+ expected: FAIL
+
+ [e.style['popover-hide-delay'\] = "0s" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-hide-delay'\] = "0ms" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-hide-delay'\] = "32s" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-hide-delay'\] = "123ms" should set the property value]
+ expected: FAIL
+
+ [e.style['popover-hide-delay'\] = "inherit" should set the property value]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Transitions: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Transitions with transition: all: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [CSS Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-1.5) should be [0s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (-0.3) should be [0.7s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0) should be [1s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (0.5) should be [1.5s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1) should be [2s\]]
+ expected: FAIL
+
+ [Web Animations: property <popover-hide-delay> from [1s\] to [2000ms\] at (1.5) should be [2.5s\]]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/popovers/popover-types-with-hints.tentative.html.ini b/tests/wpt/metadata/html/semantics/popovers/popover-types-with-hints.tentative.html.ini
index 1b22b6c66b1..9f9abc2e2b3 100644
--- a/tests/wpt/metadata/html/semantics/popovers/popover-types-with-hints.tentative.html.ini
+++ b/tests/wpt/metadata/html/semantics/popovers/popover-types-with-hints.tentative.html.ini
@@ -19,3 +19,9 @@
[If you: a) show a popover=auto (call it D), then b) show a non-descendent popover=hint of D (call it T), then c) hide D, then T should be left showing. (Non-nested popover=hint can stay open when unrelated popover=autos are hidden)]
expected: FAIL
+
+ [If a popover=hint is shown, it should hide any other open popover=hint popovers, including ancestral popovers. (You can't nest popover=hint)]
+ expected: FAIL
+
+ [If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral popover of the popover=auto. (You can't nest a popover=auto inside a popover=hint)]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini
new file mode 100644
index 00000000000..2212b9d731f
--- /dev/null
+++ b/tests/wpt/metadata/html/semantics/scripting-1/the-script-element/defer-script/async-script.html.ini
@@ -0,0 +1,4 @@
+[async-script.html?reload]
+ expected: ERROR
+
+[async-script.html]
diff --git a/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini
new file mode 100644
index 00000000000..b8bdf33cb65
--- /dev/null
+++ b/tests/wpt/metadata/html/syntax/parsing/DOMContentLoaded-defer.html.ini
@@ -0,0 +1,3 @@
+[DOMContentLoaded-defer.html]
+ [The end: DOMContentLoaded and defer scripts]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini b/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini
index 260d8909be2..17c0c562d23 100644
--- a/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini
+++ b/tests/wpt/metadata/html/syntax/parsing/html5lib_webkit02.html.ini
@@ -2,12 +2,102 @@
[html5lib_webkit02.html 3e6b37a5fd0b16769f71f8e6a022ef6a972769d0]
expected: FAIL
+ [html5lib_webkit02.html 5463526d91a8677b27b6967866d6605f1bb03aac]
+ expected: FAIL
+
+ [html5lib_webkit02.html 4879f476053094cf5602d325724675378856a902]
+ expected: FAIL
+
+ [html5lib_webkit02.html 44c88b90236f01ebc8e0123363b527640a07070c]
+ expected: FAIL
+
+ [html5lib_webkit02.html cfb304e8f2d3cbdecc362226e7775cab452d5489]
+ expected: FAIL
+
+ [html5lib_webkit02.html 3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87]
+ expected: FAIL
+
+ [html5lib_webkit02.html ecd089f9b5193fad306c5b475c4711547fe5e209]
+ expected: FAIL
+
+ [html5lib_webkit02.html cee2230c74671c594a1140a68d16e3d3e5ae005a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90]
+ expected: FAIL
+
+ [html5lib_webkit02.html a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 61f8d527795dc8044a95a3e2437de81e16597ceb]
+ expected: FAIL
+
[html5lib_webkit02.html?run_type=uri]
[html5lib_webkit02.html 3e6b37a5fd0b16769f71f8e6a022ef6a972769d0]
expected: FAIL
+ [html5lib_webkit02.html 5463526d91a8677b27b6967866d6605f1bb03aac]
+ expected: FAIL
+
+ [html5lib_webkit02.html 4879f476053094cf5602d325724675378856a902]
+ expected: FAIL
+
+ [html5lib_webkit02.html 44c88b90236f01ebc8e0123363b527640a07070c]
+ expected: FAIL
+
+ [html5lib_webkit02.html cfb304e8f2d3cbdecc362226e7775cab452d5489]
+ expected: FAIL
+
+ [html5lib_webkit02.html 3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87]
+ expected: FAIL
+
+ [html5lib_webkit02.html ecd089f9b5193fad306c5b475c4711547fe5e209]
+ expected: FAIL
+
+ [html5lib_webkit02.html cee2230c74671c594a1140a68d16e3d3e5ae005a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90]
+ expected: FAIL
+
+ [html5lib_webkit02.html a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 61f8d527795dc8044a95a3e2437de81e16597ceb]
+ expected: FAIL
+
[html5lib_webkit02.html?run_type=write]
[html5lib_webkit02.html 3e6b37a5fd0b16769f71f8e6a022ef6a972769d0]
expected: FAIL
+
+ [html5lib_webkit02.html 5463526d91a8677b27b6967866d6605f1bb03aac]
+ expected: FAIL
+
+ [html5lib_webkit02.html 4879f476053094cf5602d325724675378856a902]
+ expected: FAIL
+
+ [html5lib_webkit02.html 44c88b90236f01ebc8e0123363b527640a07070c]
+ expected: FAIL
+
+ [html5lib_webkit02.html cfb304e8f2d3cbdecc362226e7775cab452d5489]
+ expected: FAIL
+
+ [html5lib_webkit02.html 3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87]
+ expected: FAIL
+
+ [html5lib_webkit02.html ecd089f9b5193fad306c5b475c4711547fe5e209]
+ expected: FAIL
+
+ [html5lib_webkit02.html cee2230c74671c594a1140a68d16e3d3e5ae005a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90]
+ expected: FAIL
+
+ [html5lib_webkit02.html a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a]
+ expected: FAIL
+
+ [html5lib_webkit02.html 61f8d527795dc8044a95a3e2437de81e16597ceb]
+ expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini b/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini
deleted file mode 100644
index f9a4f08cd70..00000000000
--- a/tests/wpt/metadata/html/webappapis/dynamic-markup-insertion/document-write/module-tla-delayed.html.ini
+++ /dev/null
@@ -1,3 +0,0 @@
-[module-tla-delayed.html]
- [document.write in an imported module]
- expected: FAIL
diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini
index dbe1def99e3..cb8afdd7287 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/integration-with-the-javascript-job-queue/promise-job-entry-different-function-realm.html.ini
@@ -1,6 +1,7 @@
[promise-job-entry-different-function-realm.html]
+ expected: TIMEOUT
[Fulfillment handler on fulfilled promise]
- expected: FAIL
+ expected: TIMEOUT
[Rejection handler on pending-then-rejected promise]
expected: FAIL
@@ -9,7 +10,7 @@
expected: FAIL
[Rejection handler on rejected promise]
- expected: FAIL
+ expected: TIMEOUT
[Fulfillment handler on pending-then-fulfilled promise]
- expected: FAIL
+ expected: TIMEOUT
diff --git a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini
index 1d71471b73c..4a48dd15a9d 100644
--- a/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini
+++ b/tests/wpt/metadata/html/webappapis/scripting/processing-model-2/unhandled-promise-rejections/promise-rejection-events.html.ini
@@ -1,7 +1,6 @@
[promise-rejection-events.html]
- expected: TIMEOUT
[delayed handling: delaying handling rejected promise created from createImageBitmap will cause both events to fire]
- expected: TIMEOUT
+ expected: FAIL
[unhandledrejection: from createImageBitmap which is UA triggered]
expected: FAIL
diff --git a/tests/wpt/metadata/url/urlsearchparams-delete.any.js.ini b/tests/wpt/metadata/url/urlsearchparams-delete.any.js.ini
index baa982aa8ae..0607d667d29 100644
--- a/tests/wpt/metadata/url/urlsearchparams-delete.any.js.ini
+++ b/tests/wpt/metadata/url/urlsearchparams-delete.any.js.ini
@@ -2,7 +2,13 @@
[Changing the query of a URL with an opaque path can impact the path]
expected: FAIL
+ [Two-argument delete()]
+ expected: FAIL
+
[urlsearchparams-delete.any.html]
[Changing the query of a URL with an opaque path can impact the path]
expected: FAIL
+
+ [Two-argument delete()]
+ expected: FAIL
diff --git a/tests/wpt/metadata/url/urlsearchparams-has.any.js.ini b/tests/wpt/metadata/url/urlsearchparams-has.any.js.ini
new file mode 100644
index 00000000000..41e60afed19
--- /dev/null
+++ b/tests/wpt/metadata/url/urlsearchparams-has.any.js.ini
@@ -0,0 +1,8 @@
+[urlsearchparams-has.any.html]
+ [Two-argument has()]
+ expected: FAIL
+
+
+[urlsearchparams-has.any.worker.html]
+ [Two-argument has()]
+ expected: FAIL
diff --git a/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini b/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini
index 39d039a0132..04c2032c723 100644
--- a/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini
+++ b/tests/wpt/metadata/webmessaging/broadcastchannel/cross-partition.https.tentative.html.ini
@@ -1,5 +1,5 @@
[cross-partition.https.tentative.html]
- expected: CRASH
+ expected: TIMEOUT
[BroadcastChannel messages aren't received from a cross-partition iframe]
expected: FAIL
diff --git a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini b/tests/wpt/metadata/webmessaging/with-ports/018.html.ini
deleted file mode 100644
index b7b36c1d3a4..00000000000
--- a/tests/wpt/metadata/webmessaging/with-ports/018.html.ini
+++ /dev/null
@@ -1,4 +0,0 @@
-[018.html]
- expected: TIMEOUT
- [origin of the script that invoked the method, javascript:]
- expected: TIMEOUT
diff --git a/tests/wpt/metadata/webmessaging/without-ports/017.html.ini b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini
new file mode 100644
index 00000000000..c7946fc91b4
--- /dev/null
+++ b/tests/wpt/metadata/webmessaging/without-ports/017.html.ini
@@ -0,0 +1,4 @@
+[017.html]
+ expected: TIMEOUT
+ [origin of the script that invoked the method, about:blank]
+ expected: TIMEOUT
diff --git a/tests/wpt/web-platform-tests/.azure-pipelines.yml b/tests/wpt/web-platform-tests/.azure-pipelines.yml
index aacd78815ad..20d5ec0f431 100644
--- a/tests/wpt/web-platform-tests/.azure-pipelines.yml
+++ b/tests/wpt/web-platform-tests/.azure-pipelines.yml
@@ -541,3 +541,40 @@ jobs:
parameters:
dependsOn: results_safari_preview
artifactName: safari-preview-results
+
+- job: results_wktr_preview
+ displayName: 'all tests: WebKitTestRunner'
+ condition: |
+ or(eq(variables['Build.SourceBranch'], 'refs/heads/triggers/wktr_preview'),
+ and(eq(variables['Build.Reason'], 'Manual'), variables['run_all_wktr_preview']))
+ strategy:
+ parallel: 8 # chosen to make runtime ~2h
+ timeoutInMinutes: 180
+ pool:
+ vmImage: 'macOS-12'
+ steps:
+ - task: UsePythonVersion@0
+ inputs:
+ versionSpec: '3.10'
+ - template: tools/ci/azure/checkout.yml
+ - template: tools/ci/azure/pip_install.yml
+ parameters:
+ packages: virtualenv
+ - template: tools/ci/azure/install_certs.yml
+ - template: tools/ci/azure/update_hosts.yml
+ - template: tools/ci/azure/update_manifest.yml
+ - script: |
+ set -eux -o pipefail
+ export SYSTEM_VERSION_COMPAT=0
+ ./wpt run --no-manifest-update --no-restart-on-unexpected --no-fail-on-unexpected --this-chunk=$(System.JobPositionInPhase) --total-chunks=$(System.TotalJobsInPhase) --chunk-type hash --log-wptreport $(Build.ArtifactStagingDirectory)/wpt_report_$(System.JobPositionInPhase).json --log-wptscreenshot $(Build.ArtifactStagingDirectory)/wpt_screenshot_$(System.JobPositionInPhase).txt --log-mach - --log-mach-level info --channel main --install-browser wktr
+ displayName: 'Run tests'
+ - task: PublishBuildArtifacts@1
+ displayName: 'Publish results'
+ inputs:
+ artifactName: 'wktr-preview-results'
+ - template: tools/ci/azure/publish_logs.yml
+ - template: tools/ci/azure/sysdiagnose.yml
+- template: tools/ci/azure/fyi_hook.yml
+ parameters:
+ dependsOn: results_wktr_preview
+ artifactName: wktr-preview-results
diff --git a/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html b/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html
new file mode 100644
index 00000000000..ca60986d337
--- /dev/null
+++ b/tests/wpt/web-platform-tests/accname/name/shadowdom/basic.html
@@ -0,0 +1,35 @@
+<!doctype html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/wai-aria/scripts/aria-utils.js"></script>
+
+<label id="label1">
+ <div id="host1"></div>
+</label>
+<button id="labelled1"
+ class="labelled"
+ type="button"
+ aria-labelledby="label1"
+ data-expectedlabel="foo"
+ data-testname="aria-labelledby reference to element with text content inside shadow DOM"></button>
+
+<label id="label2">
+ <div id="host2"></div>
+</label>
+<button id="labelled2"
+ class="labelled"
+ type="button"
+ aria-labelledby="label2"
+ data-expectedlabel="bar"
+ data-testname="aria-labelledby reference to element with aria-label inside shadow DOM"></button>
+<script>
+
+document.getElementById('host1').attachShadow({ mode: 'open' }).innerHTML = 'foo';
+document.getElementById('host2').attachShadow({ mode: 'open' }).innerHTML = '<div aria-label="bar"></div>';
+
+AriaUtils.verifyLabelsBySelector('.labelled');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html b/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html
new file mode 100644
index 00000000000..9155a2eef3b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/accname/name/shadowdom/slot.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/wai-aria/scripts/aria-utils.js"></script>
+
+<label id="label1">
+ <div id="host1">slotted</div>
+</label>
+<button id="labelled1"
+ class="labelled"
+ type="button"
+ aria-labelledby="label1"
+ data-expectedlabel="foo slotted bar"
+ data-testname="aria-labelledby reference to element with slotted text content"></button>
+
+<label id="label2">
+ <div id="host2"></div>
+</label>
+<button id="labelled2"
+ class="labelled"
+ type="button"
+ aria-labelledby="label2"
+ data-expectedlabel="foo default bar"
+ data-testname="aria-labelledby reference to element with default slotted text content"></button>
+
+<label id="label3">
+ <div id="host3">slotted</div>
+</label>
+<button id="labelled3"
+ class="labelled"
+ type="button"
+ aria-labelledby="label3"
+ data-expectedlabel="foo slotted bar"
+ data-testname="aria-labelledby reference to element with slotted text content and aria-label on slot"></button>
+
+<label id="label4">
+ <div id="host4"></div>
+</label>
+<button id="labelled4"
+ class="labelled"
+ type="button"
+ aria-labelledby="label4"
+ data-expectedlabel="foo default bar"
+ data-testname="aria-labelledby reference to element with default slotted text content and aria-label on slot"></button>
+
+<script>
+
+document.getElementById('host1').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot></slot> bar';
+document.getElementById('host2').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot>default</slot> bar';
+document.getElementById('host3').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot aria-label="label"></slot> bar';
+document.getElementById('host4').attachShadow({ mode: 'open' }).innerHTML = 'foo <slot aria-label="label">default</slot> bar';
+
+AriaUtils.verifyLabelsBySelector('.labelled');
+
+</script>
diff --git a/tests/wpt/web-platform-tests/credential-management/support/fedcm-mock.js b/tests/wpt/web-platform-tests/credential-management/support/fedcm-mock.js
index 18634355b8e..cb48bdb27e8 100644
--- a/tests/wpt/web-platform-tests/credential-management/support/fedcm-mock.js
+++ b/tests/wpt/web-platform-tests/credential-management/support/fedcm-mock.js
@@ -108,6 +108,9 @@ export class MockFederatedAuthRequest {
async closeModalDialogView() {
}
+ async preventSilentAccess() {
+ }
+
async reset() {
this.token_ = null;
this.selected_identity_provider_config_url_ = null;
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset-ref.html b/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset-ref.html
new file mode 100644
index 00000000000..b912624b50b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset-ref.html
@@ -0,0 +1,20 @@
+<!doctype html>
+<title>background-attachment: fixed with border-radius and offset (reference)</title>
+<style>
+ .stripe-not-fixed {
+ position: absolute;
+ top: calc(8px - 128px);
+ width: 200px;
+ height: 683px;
+ background-image: url("/images/grgr-256x256.png");
+ background-position: 0px -80px;
+ background-size: 1024px 768px;
+ background-repeat: no-repeat;
+ clip-path: inset(0 0 385px 0);
+ }
+ body {
+ overflow: hidden;
+ height: 300vh;
+ }
+</style>
+<div class="stripe-not-fixed"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html b/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html
new file mode 100644
index 00000000000..5d92bcb56a7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/background-attachment-fixed-border-radius-offset.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<title>background-attachment: fixed with border-radius and offset</title>
+<link rel="help" href="https://drafts.csswg.org/css-backgrounds/#background-attachment">
+<link rel="help" href="https://crbug.com/1439780">
+<link rel="match" href="background-attachment-fixed-border-radius-offset-ref.html">
+<style>
+ .stripe {
+ position: absolute;
+ top: calc(8px - 128px);
+ width: 200px;
+ height: 683px;
+ background-image: url("/images/grgr-256x256.png");
+ background-position: 0px -200px;
+ background-size: 1024px 768px;
+ background-repeat: no-repeat;
+ background-attachment: fixed;
+ border-radius: 1px 0 0 0;
+ clip-path: inset(0 0 385px 0);
+ }
+ body {
+ overflow: hidden;
+ height: 300vh;
+ }
+</style>
+<div class="stripe"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-shorthand.html b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-shorthand.html
index 30491a534ec..487ce876fa5 100644
--- a/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-shorthand.html
+++ b/tests/wpt/web-platform-tests/css/css-backgrounds/parsing/border-shorthand.html
@@ -9,9 +9,14 @@
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/css/support/shorthand-testcommon.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
</head>
<body>
<script>
+
+test_invalid_value('border', '2px solid color-mix(42deg)');
+test_invalid_value('border', '2px solid color-contrast(42deg)');
+
test_shorthand_value('border', '5px dotted blue', {
'border-top-width': '5px',
'border-right-width': '5px',
diff --git a/tests/wpt/web-platform-tests/css/css-break/transform-011.html b/tests/wpt/web-platform-tests/css/css-break/transform-011.html
new file mode 100644
index 00000000000..58008e509ea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-break/transform-011.html
@@ -0,0 +1,16 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1442522">
+<div id="container" style="overflow:auto; width:100px; height:100px;">
+ <div style="columns:5; gap:0; column-fill:auto; height:100px;">
+ <div style="transform:rotate(180deg); height:500px;"></div>
+ </div>
+</div>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script>
+ test(()=> {
+ assert_equals(container.scrollHeight, 100);
+ assert_equals(container.scrollWidth, 100);
+ }, "Rotating 180 degrees with transform origin at the center");
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html b/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html
new file mode 100644
index 00000000000..b47ee5942b8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003-ref.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Reference: currentColor is inherited correctly in color-mix()</title>
+<style>
+div {
+ color: color-mix(in srgb, green 50%, white);
+}
+</style>
+<div>
+ <div>This text should be pale green</div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003.html b/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003.html
new file mode 100644
index 00000000000..7d9b110aeb1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-color/color-mix-currentcolor-003.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<link rel="match" href="color-mix-currentcolor-003-ref.html">
+<title>currentColor is inherited correctly in color-mix()</title>
+<link rel="help" href="https://drafts.csswg.org/css-color-5/#color-mix">
+<link rel="author" title="Tim Nguyen" href="https://github.com/nt1m">
+<style>
+body {
+ color: green;
+}
+div {
+ color: color-mix(in srgb, currentColor 50%, white);
+}
+div > div {
+ color: inherit;
+}
+</style>
+<div>
+ <div>This text should be pale green</div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/css-contain/container-queries/container-units-content-box.html b/tests/wpt/web-platform-tests/css/css-contain/container-queries/container-units-content-box.html
new file mode 100644
index 00000000000..89a76e868ce
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-contain/container-queries/container-units-content-box.html
@@ -0,0 +1,58 @@
+<!doctype html>
+<title>Container Relative Units: evaluate against the content box</title>
+<link rel="help" href="https://drafts.csswg.org/css-contain-3/#container-lengths">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="support/cq-testcommon.js"></script>
+<style>
+.size {
+ container-type: size;
+ width:100px;
+ height:50px;
+ border: 10px solid green;
+ padding: 10px;
+}
+.border-box {
+ box-sizing: border-box;
+}
+</style>
+<div id=ref></div>
+<div class="size">
+ <div id=child></div>
+</div>
+<div class="size border-box">
+ <div id=child2></div>
+</div>
+<script>
+ setup(() => assert_implements_container_queries());
+
+ function assert_unit_equals(element, actual, expected) {
+ try {
+ element.style.padding = actual;
+ ref.style.padding = expected;
+ assert_equals(getComputedStyle(element).paddingLeft,
+ getComputedStyle(ref).paddingLeft);
+ } finally {
+ element.style = '';
+ ref.style = '';
+ }
+ }
+
+ test(function() {
+ assert_unit_equals(child, '10cqi', '10px');
+ assert_unit_equals(child, '10cqw', '10px');
+ assert_unit_equals(child, '10cqb', '5px');
+ assert_unit_equals(child, '10cqh', '5px');
+ assert_unit_equals(child, '10cqmin', '5px');
+ assert_unit_equals(child, '10cqmax', '10px');
+ }, 'Container units are relative to the content box of the container');
+
+ test(function() {
+ assert_unit_equals(child2, '10cqi', '6px');
+ assert_unit_equals(child2, '10cqw', '6px');
+ assert_unit_equals(child2, '10cqb', '1px');
+ assert_unit_equals(child2, '10cqh', '1px');
+ assert_unit_equals(child2, '10cqmin', '1px');
+ assert_unit_equals(child2, '10cqmax', '6px');
+ }, 'Container units are relative to the content box of the container (box-sizing: border-box)');
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix-ref.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix-ref.html
index f106e616c52..aa32f53639e 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix-ref.html
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<meta charset="UTF-8">
-<title>CSS Reference: descriptor prefix</title>
+<title>CSS Reference: symbols function, invalid</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/">
<link rel="stylesheet" href="support/ref-common.css">
<!-- ol -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>Appendix -2.&nbsp;</div>
+<div>Appendix -1.&nbsp;</div>
+<div>Appendix 0.&nbsp;</div>
<div>Appendix I.&nbsp;</div>
<div>Appendix II.&nbsp;</div>
<!-- section -->
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix.html
index b9cf1b9bb1f..ecf18420aad 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/descriptor-prefix.html
@@ -7,8 +7,6 @@
<link rel="stylesheet" href="support/test-common.css">
<style type="text/css">
@counter-style a {
- /* Note that upper-roman has a range of (1, 3999), so negative or zero values
- will use the fallback style. */
system: extends upper-roman;
prefix: "Appendix ";
}
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive-ref.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive-ref.html
index 993371307ae..b45ab5fcecf 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive-ref.html
@@ -1,12 +1,12 @@
<!DOCTYPE html>
<meta charset="UTF-8">
-<title>CSS Reference: system additive</title>
+<title>CSS Reference: symbols function, invalid</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/">
<link rel="stylesheet" href="support/ref-common.css">
<!-- list-style-type: a -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
<div>&#x2680;</div>
<div>&#x2681;</div>
<div>&#x2682;</div>
@@ -22,8 +22,8 @@
document.write(Array(61).join('&#x2685;'));
</script></div>
<!-- list-style-type: b -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
+<div>-2</div>
+<div>-1</div>
<div>&#x2637;</div>
<div>&#x2636;</div>
<div>&#x2635;</div>
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive.html
index 415f00a9745..74568bccd18 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-additive.html
@@ -7,13 +7,11 @@
<link rel="stylesheet" href="support/test-common.css">
<style type="text/css">
@counter-style a {
- /* Negative and zero values cannot be represented, and will use fallback style (decimal). */
system: additive;
additive-symbols: 6 \2685, 5 \2684, 4 \2683, 3 \2682, 2 \2681, 1 \2680;
suffix: "";
}
@counter-style b {
- /* Negative values cannot be represented, and will use fallback style (decimal). */
system: additive;
additive-symbols: 7 \2630, 6 \2631, 5 \2632, 4 \2633, 3 \2634, 2 \2635, 1 \2636, 0 \2637;
suffix: "";
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic-ref.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic-ref.html
index b4a534beb83..331d96ea4c8 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic-ref.html
@@ -3,9 +3,9 @@
<title>CSS Reference: symbols function, invalid</title>
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/">
<link rel="stylesheet" href="support/ref-common.css">
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
<div>&#x26AA;</div>
<div>&#x26AB;</div>
<div>&#x26AA;&#x26AA;</div>
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic.html
index a986c54ac9f..9447eaf9404 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-alphabetic.html
@@ -7,8 +7,6 @@
<link rel="stylesheet" href="support/test-common.css">
<style type="text/css">
@counter-style a {
- /* alphabetic has a range that starts from 1, so negative/zero values will
- fall back to decimal */
system: alphabetic;
symbols: \26AA \26AB;
suffix: '';
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends-ref.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends-ref.html
index 8105956ecb8..c988310c25b 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends-ref.html
@@ -4,24 +4,24 @@
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/">
<link rel="stylesheet" href="support/ref-common.css">
<!-- list-style-type: a -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>Chapter -2.&nbsp;</div>
+<div>Chapter -1.&nbsp;</div>
+<div>Chapter 0.&nbsp;</div>
<div>Chapter I.&nbsp;</div>
<div>Chapter II.&nbsp;</div>
<div>Chapter III.&nbsp;</div>
<div>Chapter IV.&nbsp;</div>
<div>Chapter V.&nbsp;</div>
-<div>6.&nbsp;</div>
-<div>7.&nbsp;</div>
+<div>Chapter 6.&nbsp;</div>
+<div>Chapter 7.&nbsp;</div>
<!-- list-style-type: b -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>Section -2.&nbsp;</div>
+<div>Section -1.&nbsp;</div>
+<div>Section 0.&nbsp;</div>
<div>Section I.&nbsp;</div>
<div>Section II.&nbsp;</div>
<div>Section III.&nbsp;</div>
<div>Section IV.&nbsp;</div>
<div>Section V.&nbsp;</div>
<div>Section VI.&nbsp;</div>
-<div>7.&nbsp;</div>
+<div>Section 7.&nbsp;</div>
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends.html
index a8f95323aa4..287930d0f60 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-extends.html
@@ -7,13 +7,11 @@
<link rel="stylesheet" href="support/test-common.css">
<style type="text/css">
@counter-style a {
- /* Values outside the range will fall back to decimal (and hence have no prefix) */
system: extends upper-roman;
prefix: "Chapter ";
range: 1 5;
}
@counter-style b {
- /* Values outside the range will fall back to decimal (and hence have no prefix) */
system: extends a;
prefix: "Section ";
range: 1 6;
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic-ref.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic-ref.html
index 61b743f3588..7229c895ffc 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic-ref.html
@@ -4,9 +4,9 @@
<link rel="author" title="Xidorn Quan" href="https://www.upsuper.org/">
<link rel="stylesheet" href="support/ref-common.css">
<!-- list-style-type: a -->
-<div>-2.&nbsp;</div>
-<div>-1.&nbsp;</div>
-<div>0.&nbsp;</div>
+<div>-2</div>
+<div>-1</div>
+<div>0</div>
<div>*</div>
<div>&#x2051;</div>
<div>&#x2020;</div>
diff --git a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic.html b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic.html
index 99c1188c18e..a3ab8b1a98a 100644
--- a/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic.html
+++ b/tests/wpt/web-platform-tests/css/css-counter-styles/counter-style-at-rule/system-symbolic.html
@@ -8,8 +8,6 @@
<style type="text/css">
@counter-style a {
/* system: symbolic; */
- /* symbolic does not support negative or zero values, so they will fall back
- to decimal */
symbols: '*' \2051 \2020 \2021;
suffix: '';
}
diff --git a/tests/wpt/web-platform-tests/css/css-display/display-none-root-hit-test-crash.html b/tests/wpt/web-platform-tests/css/css-display/display-none-root-hit-test-crash.html
new file mode 100644
index 00000000000..b2467fa58fd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-display/display-none-root-hit-test-crash.html
@@ -0,0 +1,9 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1409273">
+<style>
+ html { display: none; }
+</style>
+<script>
+ document.elementFromPoint(10, 10);
+</script>
diff --git a/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html b/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html
index 6dc9d0ae2f6..8ce254f7b15 100644
--- a/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html
+++ b/tests/wpt/web-platform-tests/css/css-flexbox/parsing/flex-flow-valid.html
@@ -15,6 +15,7 @@
test_valid_value("flex-flow", "column nowrap", "column");
test_valid_value("flex-flow", "nowrap column", "column");
test_valid_value("flex-flow", "wrap row-reverse", "row-reverse wrap");
+test_valid_value("flex-flow", "nowrap", "row");
</script>
</body>
</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed-ref.html b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed-ref.html
new file mode 100644
index 00000000000..71c081f2cac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed-ref.html
@@ -0,0 +1,29 @@
+<!DOCTYPE html>
+<html>
+<head>
+<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-grid-3">
+<meta name="assert" content="When the width of the masonry grid changes, items are repositioned with correct offsets and are not overlapping">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
+<style>
+grid {
+ display: grid;
+ width: 1%;
+ grid-template-rows: masonry;
+ grid-template-columns: auto;
+ grid-gap: 10px;
+ font-family: Ahem;
+ font-size: 40px;
+}
+item {
+ background-color: grey;
+}
+</style>
+</head>
+<body>
+ <grid>
+ <item>Hello, world!</item>
+ <item>2</item>
+ </grid>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed.html b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed.html
new file mode 100644
index 00000000000..3a1c4cfa9c0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-grid/masonry/tentative/item-placement/masonry-rows-with-grid-width-changed.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta charset="utf-8">
+<link rel="author" title="Sammy Gill" href="mailto:sammy.gill@apple.com">
+<link rel="help" href="https://drafts.csswg.org/css-grid-3">
+<link rel="match" href="masonry-rows-with-grid-width-changed-ref.html">
+<meta name="assert" content="When the width of the masonry grid changes, items are repositioned with correct offsets and are not overlapping">
+<link rel="stylesheet" type="text/css" href="/fonts/ahem.css">
+<style>
+ grid {
+ display: grid;
+ grid-template-rows: masonry;
+ grid-template-columns: auto;
+ grid-gap: 10px;
+ font-family: Ahem;
+ font-size: 40px;
+ }
+ item {
+ background-color: grey;
+ }
+</style>
+</head>
+<body>
+ <grid>
+ <item>Hello, world!</item>
+ <item>2</item>
+ </grid>
+</body>
+<script>
+ // Make sure layout occurs and then mutate the style to retrigger it
+ document.body.offsetHeight;
+ document.querySelector("grid").style["width"] = "1%";
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-2.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-2.html
index d506c364e3b..c686b9a6940 100644
--- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-2.html
+++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering-2.html
@@ -6,10 +6,10 @@
<meta name="assert" content="image-set rendering with negative resolution">
<style>
#test {
- background-image: url("/images/red.png");
+ background-image: url("/images/green.png");
background-image: image-set(
url("/images/red.png") -1x,
- url("/images/green.png") 2x
+ url("/images/red.png") 2x
);
width: 100px;
height: 100px;
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering.html
index 36fa08901ba..416b6929f28 100644
--- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering.html
+++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-negative-resolution-rendering.html
@@ -2,12 +2,12 @@
<title>Image set negative resolution rendering</title>
<link rel="author" title="Traian Captan" href="mailto:tcaptan@chromium.org">
<link rel="help" href="https://drafts.csswg.org/css-images-4/#image-set-notation">
-<link rel="match" href="/css/reference/blank.html">
+<link rel="match" href="reference/image-set-rendering-ref.html">
<meta name="assert" content="image-set rendering with negative resolution">
<style>
#test {
- background-image: url("/images/red.png");
- background-image: image-set(url("/images/green.png") -1x);
+ background-image: url("/images/green.png");
+ background-image: image-set(url("/images/red.png") -1x);
width: 100px;
height: 100px;
}
diff --git a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html
index c33652a5fd2..2f56fcf74b4 100644
--- a/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html
+++ b/tests/wpt/web-platform-tests/css/css-images/image-set/image-set-parsing.html
@@ -160,19 +160,19 @@ function test_non_positive_resolutions_parsing() {
'image-set(url("example.png") 0dpcm)'
);
- test_valid_value_variants(
+ test_invalid_value_variants(
'background-image',
'image-set(url("example.png") -1x)'
);
- test_valid_value_variants(
+ test_invalid_value_variants(
'background-image',
'image-set(url("example.png") -3dppx)'
);
- test_valid_value_variants(
+ test_invalid_value_variants(
'background-image',
'image-set(url("example.png") -96dpi)'
);
- test_valid_value_variants(
+ test_invalid_value_variants(
'background-image',
'image-set(url("example.png") -113dpcm)'
);
diff --git a/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules-ref.html b/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules-ref.html
index 945ed305136..c4fabd672a4 100644
--- a/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules-ref.html
+++ b/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules-ref.html
@@ -5,23 +5,50 @@
<style>
.test {
background-color: red;
- width: 100px;
- height: 100px;
+ width: 30px;
+ height: 30px;
display: grid;
}
- @media (min-width: 50px) {
+ @media (min-width: 10px) {
.test-5 > div {
background-color: green;
}
}
+ @media (min-width: 10px) {
+ .test-6 > div {
+ background-color: green;
+ }
+ }
+
@supports (display: grid) {
.test-10 {
background-color: green;
}
}
+ @layer {
+ .test-11 {
+ background-color: green !important;
+ }
+ }
+
+ @scope (.test-12) {
+ :scope {
+ background-color: green;
+ }
+ }
+
+ div {
+ container-type: inline-size;
+ }
+ @container (width >= 0px) {
+ .test-13 {
+ background-color: green;
+ }
+ }
+
body * + * {
margin-top: 8px;
}
@@ -29,5 +56,9 @@
<body>
<p>Tests pass if <strong>block is green</strong></p>
<div class="test test-5"><div></div></div>
+ <div class="test test-6"><div></div></div>
<div class="test test-10"><div></div></div>
+ <div class="test test-11"><div></div></div>
+ <div class="test"><div class="test-12"></div></div>
+ <div class="test"><div class="test-13"></div></div>
</body>
diff --git a/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules.html b/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules.html
index be925d5d873..55ecc1f9e49 100644
--- a/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules.html
+++ b/tests/wpt/web-platform-tests/css/css-nesting/conditional-rules.html
@@ -6,19 +6,25 @@
<style>
.test {
background-color: red;
- width: 100px;
- height: 100px;
+ width: 30px;
+ height: 30px;
display: grid;
}
.test-5 {
- @media (min-width: 50px) {
+ @media (min-width: 10px) {
& {
background-color: green;
}
}
}
+ .test-6 {
+ @media (min-width: 10px) {
+ background-color: green;
+ }
+ }
+
.test-10 {
@supports (display: grid) {
& {
@@ -27,12 +33,43 @@
}
}
+ .test-11 {
+ @layer {
+ & {
+ background-color: green !important;
+ }
+ }
+ }
+
+ .test-12 {
+ @scope (.test-12) {
+ :scope {
+ background-color: green;
+ }
+ }
+ }
+
+ div {
+ container-type: inline-size;
+ }
+ .test-13 {
+ @container (width >= 0px) {
+ & {
+ background-color: green;
+ }
+ }
+ }
+
body * + * {
margin-top: 8px;
}
</style>
<body>
<p>Tests pass if <strong>block is green</strong></p>
- <div class="test test-5"><div></div></div>
- <div class="test test-10"><div></div></div>
+ <div class="test test-5"></div>
+ <div class="test test-6"></div>
+ <div class="test test-10"></div>
+ <div class="test test-11"></div>
+ <div class="test test-12"></div>
+ <div class="test"><div class="test-13"></div></div>
</body>
diff --git a/tests/wpt/web-platform-tests/css/css-nesting/invalid-inner-rules.html b/tests/wpt/web-platform-tests/css/css-nesting/invalid-inner-rules.html
index 219dcac3f56..ffb53420e2d 100644
--- a/tests/wpt/web-platform-tests/css/css-nesting/invalid-inner-rules.html
+++ b/tests/wpt/web-platform-tests/css/css-nesting/invalid-inner-rules.html
@@ -8,7 +8,7 @@
<style id="ss">
div {
/* This is not a conditional rule, and thus cannot be in nesting context. */
- @layer {
+ @font-face {
&.a { font-size: 10px; }
}
@@ -16,7 +16,7 @@ div {
&.a { color: red; }
/* Same. */
- @layer {
+ @font-face {
&.a { font-size: 10px; }
}
}
@@ -41,11 +41,11 @@ div {
let [ss] = document.styleSheets;
assert_equals(ss.cssRules.length, 1);
assert_throws_dom('HierarchyRequestError',
- () => { ss.cssRules[0].cssRules[0].insertRule('@layer {}', 0); });
+ () => { ss.cssRules[0].cssRules[0].insertRule('@font-face {}', 0); });
assert_throws_dom('HierarchyRequestError',
- () => { ss.cssRules[0].insertRule('@layer {}', 0); });
+ () => { ss.cssRules[0].insertRule('@font-face {}', 0); });
- // The @layer rules should be ignored (again).
+ // The @font-face rules should be ignored (again).
assert_equals(ss.cssRules[0].cssText,
`div {
@media screen {
diff --git a/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html b/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html
index 0bf335d770d..dcd981e92e2 100644
--- a/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html
+++ b/tests/wpt/web-platform-tests/css/css-overscroll-behavior/overscroll-behavior.html
@@ -119,7 +119,7 @@ function verify_x_prevented_and_set_boundary_allows_inner() {
instruction3.style.fontWeight = 'bold';
test.step(function() {
assert_equals(root.scrollTop, 0, "overscroll-behavior-x: none should only prevent scroll propagation on x axis.");
- assert_equalhhs(root.scrollLeft, 100, "overscroll-behavior-x: none should prevent scroll propagation on x axis." );
+ assert_equals(root.scrollLeft, 100, "overscroll-behavior-x: none should prevent scroll propagation on x axis." );
});
container.style.overscrollBehaviorX = 'none';
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/fragment-scrolling-anchors.html b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/fragment-scrolling-anchors.html
index 74b633be987..99c679acaa5 100644
--- a/tests/wpt/web-platform-tests/css/css-scroll-anchoring/fragment-scrolling-anchors.html
+++ b/tests/wpt/web-platform-tests/css/css-scroll-anchoring/fragment-scrolling-anchors.html
@@ -37,7 +37,7 @@
</div>
<script>
- test(function(t) {
+ promise_test(async function(t) {
// Note that this test passes even without scroll anchoring because of
// fragment anchoring.
window.location.hash = 'fragment';
@@ -48,7 +48,13 @@
var ch = document.getElementById('changer');
ch.style.height = 100;
+ await new Promise(resolve => addEventListener('scroll', resolve, {once: true}));
+
// Height of first + height changer + fragment margin-top.
assert_equals(window.scrollY, 1110);
+
+ first.remove();
+ changer.remove();
+ anchor.remove();
}, 'Verify scroll anchoring interaction with fragment scrolls');
</script>
diff --git a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-on-focus.html b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-on-focus.html
index 9b6f6f413e1..13709d2747a 100644
--- a/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-on-focus.html
+++ b/tests/wpt/web-platform-tests/css/css-scroll-snap/snap-on-focus.html
@@ -47,8 +47,9 @@ div {
</div>
<script>
-test(() => {
+promise_test(async () => {
document.querySelector(".no-snap").focus();
+ await new Promise(resolve => step_timeout(resolve, 0));
assert_equals(scroller.scrollTop, 1200);
}, "scroll snap should happens on Element.focus()");
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html b/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-ref.html
index b9d2418b18b..b9d2418b18b 100644
--- a/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-expected.html
+++ b/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box-ref.html
diff --git a/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html b/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html
index 7700b00dc32..1b798ff8c54 100644
--- a/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html
+++ b/tests/wpt/web-platform-tests/css/css-sizing/table-child-percentage-height-with-border-box.html
@@ -2,7 +2,7 @@
<meta charset="utf-8">
<title>Test if percentage height of table's child element with box-sizing: border-box is calculated correctly</title>
<link rel="help" href="https://drafts.csswg.org/css-sizing/#box-sizing">
-<link rel="match" href="table-child-percentage-height-with-border-box-expected.html">
+<link rel="match" href="table-child-percentage-height-with-border-box-ref.html">
<style>
html {
height: 100%;
diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/crashtests/text-decoration-on-pseudo-first-line-crash.html b/tests/wpt/web-platform-tests/css/css-text-decor/crashtests/text-decoration-on-pseudo-first-line-crash.html
new file mode 100644
index 00000000000..9b17dd9042a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-text-decor/crashtests/text-decoration-on-pseudo-first-line-crash.html
@@ -0,0 +1,12 @@
+<!DOCTYPE html>
+<link rel="help" href="https://crbug.com/1440213">
+<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-decoration-line-property">
+<style>
+*:first-line {
+ text-decoration: line-through;
+}
+* {
+ text-decoration: underline;
+}
+</style>
+<span><q></q></span>
diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2-ref.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2-ref.html
new file mode 100644
index 00000000000..47880c2ed62
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2-ref.html
@@ -0,0 +1,12 @@
+<!DOCTYPE HTML>
+<style>
+.underlined {
+ position: absolute;
+ left: 20px;
+ font-size: 100px;
+ text-decoration: underline;
+}
+</style>
+<div class="underlined" style="top: 24px; color: blue; z-index: 0">Hello</div>
+<div class="underlined" style="top: 22px; color: green; z-index: 1">Hello</div>
+<div class="underlined" style="top: 20px; color: grey; z-index: 2">Hello</div>
diff --git a/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2.html b/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2.html
new file mode 100644
index 00000000000..5b420da52b8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-text-decor/text-shadow/standards-decor-noblur-2.html
@@ -0,0 +1,17 @@
+<!DOCTYPE HTML>
+<link rel="help" href="https://drafts.csswg.org/css-text-decor-3/#text-shadow-property">
+<link rel="match" href="standards-decor-noblur-2-ref.html">
+<meta name="fuzzy" content="0-2;0-10">
+<!-- Shadows are painted below text AND its decorations -->
+<style>
+#target {
+ position: absolute;
+ top: 20px;
+ left: 20px;
+ color: grey;
+ text-shadow: green 0px 2px, blue 0px 4px;
+ font-size: 100px;
+ text-decoration: underline;
+}
+</style>
+<div id="target">Hello</div>
diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-computed.html b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-computed.html
index c99eef737cb..e10649be6ff 100644
--- a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-computed.html
+++ b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-computed.html
@@ -17,7 +17,9 @@ const REALLY_LARGE_NEGATIVE = -REALLY_LARGE;
// For <length>
test_computed_value("width", "calc(NaN * 1px)", "0px");
+test_computed_value("width", "calc(NaN * 1%)", "0px");
testComputedValueGreaterOrLowerThan("width", "calc(infinity * 1px)", REALLY_LARGE);
+testComputedValueGreaterOrLowerThan("width", "calc(infinity * 1%)", REALLY_LARGE);
testComputedValueGreaterOrLowerThan("width", "calc(infinity * 1cm)", REALLY_LARGE);
test_computed_value("width", "calc(NaN * 1rem)", "0px");
test_computed_value("width", "calc(10.135262721212548pc - 199pt / NaN)", "0px");
diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html
index f0ae43679b2..96b4c43e2d1 100644
--- a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html
+++ b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-length.html
@@ -14,6 +14,7 @@ function test_serialization(t,s, {prop="width"}={}) {
//TEST CASE | EXPECTED
var test_map = {
"1px * NaN" :"calc(NaN * 1px)",
+ "1% * NaN" :"calc(NaN * 1%)",
"1in * NaN" :"calc(NaN * 1px)",
"1cm * NaN" :"calc(NaN * 1px)",
"1mm * NaN" :"calc(NaN * 1px)",
@@ -28,6 +29,8 @@ var test_map = {
"1px * (infinity - infinity)" :"calc(NaN * 1px)",
"1px * infinity" :"calc(infinity * 1px)",
"1px * -infinity" :"calc(-infinity * 1px)",
+ "1% * infinity" :"calc(infinity * 1%)",
+ "1% * -infinity" :"calc(-infinity * 1%)",
"1px * iNFinIty" :"calc(infinity * 1px)",
"1px * (infinity + infinity)" :"calc(infinity * 1px)",
"1px * (-infinity + -infinity)" :"calc(-infinity * 1px)",
diff --git a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html
index 524aa163aab..6548ea7ea75 100644
--- a/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html
+++ b/tests/wpt/web-platform-tests/css/css-values/calc-infinity-nan-serialize-resolution.html
@@ -34,7 +34,7 @@ var test_map = {
"1 * min(inFInity*4dppx, 0dppx)" :"calc(0dppx)",
"1 * max(nAn*2dppx, 0dppx)" :"calc(NaN * 1dppx)",
"1 * min(nan*3dppx, 0dppx)" :"calc(NaN * 1dppx)",
- "1 * clamp(-INFINITY*0dppx, 0dppx, infiniTY*0dppx)" :"calc(0dppx)",
+ "1 * clamp(-INFINITY*20dppx, 0dppx, infiniTY*10dppx)" :"calc(0dppx)",
"1dppx * max(NaN, min(0,10))" :"calc(NaN * 1dppx)",
"1dppx * clamp(NaN, 0, 10)" :"calc(NaN * 1dppx)",
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/3d-transform-incoming.html b/tests/wpt/web-platform-tests/css/css-view-transitions/3d-transform-incoming.html
index b3726d4cd51..24ab886025a 100644
--- a/tests/wpt/web-platform-tests/css/css-view-transitions/3d-transform-incoming.html
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/3d-transform-incoming.html
@@ -4,7 +4,7 @@
<link rel="help" href="https://github.com/WICG/view-transitions">
<link rel="author" href="mailto:vmpstr@chromium.org">
<link rel="match" href="3d-transform-incoming-ref.html">
-<meta name=fuzzy content="3d-transform-incoming-ref.html:0-255;0-500">
+<meta name=fuzzy content="3d-transform-incoming-ref.html:0-255;0-515">
<script src="/common/reftest-wait.js"></script>
<style>
div { box-sizing: border-box; will-change: transform }
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-new.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-new.html
new file mode 100644
index 00000000000..407636b967b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-new.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box -- new content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 1; }
+html::view-transition-old(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"></div>
+<div class="box shift" style="view-transition-name: two"></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-old.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-old.html
new file mode 100644
index 00000000000..915cd41704f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-old.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box -- old content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 0; }
+html::view-transition-old(*) { animation: unset; opacity: 1; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"></div>
+<div class="box shift" style="view-transition-name: two"></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-ref.html
new file mode 100644
index 00000000000..e5fb0f80d91
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-ref.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<title>View transitions: fractional box -- reference</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<style>
+.box {
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+body { background: lightpink }
+</style>
+<div class="box"></div>
+<div class="box shift"></div>
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-new.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-new.html
new file mode 100644
index 00000000000..e50e6654a75
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-new.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box with overflow children -- new content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-with-overflow-children-ref.html">
+<!-- subpixel differences are ok in this test (in highdpi), but channel difference
+ should not be perceptible -->
+<meta name=fuzzy content="fractional-box-with-overflow-children-ref.html:0-3;0-100">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ position: relative;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ left: 0.4px;
+}
+.child1 {
+ position: absolute;
+ left: -2px;
+ width: 110px;
+ height: 25px;
+ background: darkgreen;
+}
+.child2 {
+ position: absolute;
+ top: -3px;
+ width: 50px;
+ height: 55px;
+ background: darkgreen;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 1; }
+html::view-transition-old(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"><div class="child1"></div><div class="child2"></div></div>
+<div class="box shift" style="view-transition-name: two"><div class="child1"></div><div class="child2"></div></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-old.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-old.html
new file mode 100644
index 00000000000..acf72e20df5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-old.html
@@ -0,0 +1,52 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box with overflow children -- old content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-with-overflow-children-ref.html">
+<!-- subpixel differences are ok in this test (in highdpi), but channel difference
+ should not be perceptible -->
+<meta name=fuzzy content="fractional-box-with-overflow-children-ref.html:0-3;0-100">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ position: relative;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ left: 0.4px;
+}
+.child1 {
+ position: absolute;
+ left: -2px;
+ width: 110px;
+ height: 25px;
+ background: darkgreen;
+}
+.child2 {
+ position: absolute;
+ top: -3px;
+ width: 50px;
+ height: 55px;
+ background: darkgreen;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 0; }
+html::view-transition-old(*) { animation: unset; opacity: 1; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"><div class="child1"></div><div class="child2"></div></div>
+<div class="box shift" style="view-transition-name: two"><div class="child1"></div><div class="child2"></div></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-ref.html
new file mode 100644
index 00000000000..8e53dcd2663
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-overflow-children-ref.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>View transitions: fractional box with overflow children-- reference</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<style>
+.box {
+ position: relative;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ left: 0.4px;
+}
+.child1 {
+ position: absolute;
+ left: -2px;
+ width: 110px;
+ height: 25px;
+ background: darkgreen;
+}
+.child2 {
+ position: absolute;
+ top: -3px;
+ width: 50px;
+ height: 55px;
+ background: darkgreen;
+}
+body { background: lightpink }
+</style>
+<div class="box"><div class="child1"></div><div class="child2"></div></div>
+<div class="box shift"><div class="child1"></div><div class="child2"></div></div>
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-new.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-new.html
new file mode 100644
index 00000000000..820a48b1b0f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-new.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box with shadow -- new content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-with-shadow-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ box-shadow: -2px -3px 0 7px darkgreen;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 1; }
+html::view-transition-old(*) { animation: unset; opacity: 0; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"></div>
+<div class="box shift" style="view-transition-name: two"></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-old.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-old.html
new file mode 100644
index 00000000000..882f8992ade
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-old.html
@@ -0,0 +1,36 @@
+<!DOCTYPE html>
+<html class=reftest-wait>
+<title>View transitions: fractional box with shadow -- old content</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<link rel="match" href="fractional-box-with-shadow-ref.html">
+<script src="/common/reftest-wait.js"></script>
+<style>
+.box {
+ box-shadow: -2px -3px 0 7px darkgreen;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+html::view-transition-group(*) { animation-duration: 300s; }
+html::view-transition-new(*) { animation: unset; opacity: 0; }
+html::view-transition-old(*) { animation: unset; opacity: 1; }
+html::view-transition-group(root) { animation: unset; opacity: 0; }
+html::view-transition { background: lightpink; }
+</style>
+<div class="box" style="view-transition-name: one"></div>
+<div class="box shift" style="view-transition-name: two"></div>
+<script>
+failIfNot(document.startViewTransition, "Missing document.startViewTransition");
+
+async function runTest() {
+ document.startViewTransition().ready.then(takeScreenshot);
+}
+onload = () => requestAnimationFrame(() => requestAnimationFrame(runTest));
+</script>
+
diff --git a/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-ref.html b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-ref.html
new file mode 100644
index 00000000000..639641aeb5b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/css-view-transitions/fractional-box-with-shadow-ref.html
@@ -0,0 +1,20 @@
+<!DOCTYPE html>
+<title>View transitions: fractional box with shadow -- reference</title>
+<link rel="help" href="https://drafts.csswg.org/css-view-transitions-1/">
+<link rel="author" href="mailto:vmpstr@chromium.org">
+<style>
+.box {
+ box-shadow: -2px -3px 0 7px darkgreen;
+ margin: 15px;
+ background: green;
+ width: 100.125px;
+ height: 50.875px;
+}
+.shift {
+ position: relative;
+ left: 0.4px;
+}
+body { background: lightpink }
+</style>
+<div class="box"></div>
+<div class="box shift"></div>
diff --git a/tests/wpt/web-platform-tests/css/cssom-view/scrollIntoView-smooth.html b/tests/wpt/web-platform-tests/css/cssom-view/scrollIntoView-smooth.html
index 70343cb4253..ddfa31076c2 100644
--- a/tests/wpt/web-platform-tests/css/cssom-view/scrollIntoView-smooth.html
+++ b/tests/wpt/web-platform-tests/css/cssom-view/scrollIntoView-smooth.html
@@ -16,25 +16,32 @@ var content = document.getElementById("content");
add_completion_callback(() => document.getElementById("container").remove());
function waitForScrollEnd() {
+ var wait_for_scroll_start = performance.now();
+ var last_changed_timestamp = wait_for_scroll_start;
var last_changed_frame = 0;
var last_x = window.scrollX;
var last_y = window.scrollY;
return new Promise((resolve, reject) => {
- function tick(frames) {
- // We requestAnimationFrame either for 500 frames or until 20 frames with
- // no change have been observed.
- if (frames >= 500 || frames - last_changed_frame > 20) {
+ function tick(frames, timestamp) {
+ // We requestAnimationFrame until at least 200ms have elapsed and at least
+ // 5 animation frames have run since the last change to the scroll
+ // offset, timing out after 8 seconds.
+ if (window.scrollX != last_x || window.scrollY != last_y) {
+ last_changed_timestamp = timestamp;
+ last_changed_frame = frames;
+ last_x = window.scrollX;
+ last_y = window.scrollY;
+ }
+ if (timestamp - last_changed_timestamp > 200 &&
+ frames - last_changed_frame > 4) {
resolve();
+ } else if (timestamp - wait_for_scroll_start > 8000) {
+ reject();
} else {
- if (window.scrollX != last_x || window.scrollY != last_y) {
- last_changed_frame = frames;
- last_x = window.scrollX;
- last_y = window.scrollY;
- }
requestAnimationFrame(tick.bind(null, frames + 1));
}
}
- tick(0);
+ tick(last_changed_frame, wait_for_scroll_start);
});
}
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/background-image-blur-repaint.html b/tests/wpt/web-platform-tests/css/filter-effects/background-image-blur-repaint.html
index 4a3c00c7ad3..6ec81b6f5e8 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/background-image-blur-repaint.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/background-image-blur-repaint.html
@@ -6,7 +6,7 @@
<link rel="help" href="https://drafts.fxtf.org/filter-effects-1/#FilterProperty">
<link rel="help" href="https://drafts.csswg.org/css-backgrounds-3/#background-image">
<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=415106">
-<link rel="match" href="reference/background-image-blur-repaint-expected.html">
+<link rel="match" href="reference/background-image-blur-repaint-ref.html">
<meta name="assert" content="An element with background-image and a filter should be rendered correctly after other elements on the page change size. You should see a 50x50 green box over a blurred background."/>
<script src="/common/reftest-wait.js"></script>
diff --git a/tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-expected.html b/tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-ref.html
index bf16d1fa289..bf16d1fa289 100644
--- a/tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-expected.html
+++ b/tests/wpt/web-platform-tests/css/filter-effects/reference/background-image-blur-repaint-ref.html
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001-ref.html
index 24a823f9ca3..05f54d9dc55 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001-ref.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001-ref.html
@@ -9,12 +9,15 @@
}
#target {
position: relative;
- left: 150px;
- top: 150px;
- width: 100px;
- height: 100px;
+ left: 30px;
+ top: 40px;
+ width: 10px;
+ height: 10px;
background-color: lime;
- transform: rotate(0deg) translate(50px, -150px);
+ /* ray length is sqrt(30^2 + 40^2); contain does -max(10, 10) / 2; */
+ /* the result length is 45px. angle is 180deg; */
+ /* 5 is origin shift. */
+ transform: translate(-5px, 40px);
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001.html
index 83e169298fa..ba03f1115f6 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-001.html
@@ -12,12 +12,12 @@
}
#target {
position: relative;
- left: 150px;
- top: 150px;
- width: 100px;
- height: 100px;
+ left: 30px;
+ top: 40px;
+ width: 10px;
+ height: 10px;
background-color: lime;
- offset-path: ray(45deg closest-corner contain);
+ offset-path: ray(180deg closest-corner contain);
offset-rotate: 0deg;
offset-distance: 100%;
}
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-002-ref.html
index 92ccb13af86..a5bff446700 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-002-ref.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-002-ref.html
@@ -14,8 +14,9 @@
width: 100px;
height: 100px;
background-color: lime;
- /* The vertical movement is about sqrt(150^2 - 50^2) - 50 */
- transform: translateY(91.42px);
+ /* ray length is sqrt(150^2 + 0^2); contain does -max(100, 100) / 2; */
+ /* the result length is 100. sin(90deg) * length = 100; */
+ transform: translateY(100px);
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-003-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-003-ref.html
index 3ad660eb2f2..965960f2040 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-003-ref.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-003-ref.html
@@ -14,8 +14,9 @@
width: 100px;
height: 100px;
background-color: lime;
- /* The movement is about 150 - 50 * sqrt(2) */
- transform: rotate(-45deg) translate(79.29px) rotate(45deg);
+ /* ray length is sqrt(150^2 + 0^2); contain does -max(100, 100) / 2; */
+ /* the result length is 100. sin(45deg) * length = 70.71; */
+ transform: rotate(-45deg) translate(100px) rotate(45deg);
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-004-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-004-ref.html
index 38b0d44fb1f..188e2597c71 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-004-ref.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-004-ref.html
@@ -14,8 +14,9 @@
width: 100px;
height: 100px;
background-color: lime;
- /* The movement is about sqrt(150^2 - 50^2) - 50 */
- transform: rotate(-45deg) translate(91.42px);
+ /* ray length is sqrt(150^2 + 0^2); contain does -max(100, 100) / 2; */
+ /* the result length is 100. sin(45deg) * length = 70.71; */
+ transform: rotate(-45deg) translate(100px);
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005-ref.html
index c1dafc477d3..ead5dfb8cdd 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005-ref.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005-ref.html
@@ -16,15 +16,12 @@
height: 25px;
background-color: lime;
/*
- * The original path length is 50px, which is not enough to contain
- * the element entirely, so it should be increased.
- * "75px" is just the center of the element, which makes the path
- * length increase minimally.
- * Besides, -75px = (-150px * 2) + 225px, the used offset distance is
- * -225px in this case.
- * Note: offset-anchor is "200% -300%", and ray angle is -90deg.
+ * The original path length is 50px, contain applies
+ * decrease, so that the new length is -25px (-150px / 2).
+ * Note: offset-anchor is "200% -300%", and ray angle is -90deg
+ and offset-rotate is -90deg.
*/
- transform: translate(calc(-75px), calc(25px * 3));
+ transform: translate(-75px, -12.5px) rotate(-90deg) translate(-225px, 87.5px);
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005.html b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005.html
index 0ec0c25fb88..fc747027c6c 100644
--- a/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005.html
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-ray-contain-005.html
@@ -22,8 +22,8 @@
background-color: lime;
offset-path: ray(-90deg closest-side contain);
offset-anchor: 200% -300%;
- offset-rotate: 0deg;
- offset-distance: 0%;
+ offset-rotate: -90deg;
+ offset-distance: 50%;
}
</style>
</head>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001-ref.html
new file mode 100644
index 00000000000..7bc29af79c6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(250px, 350px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001.html
new file mode 100644
index 00000000000..13df077df06
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-001.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with explicit arguments</title>
+<meta name=fuzzy content="0-1;0-200">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-circle-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: circle(closest-side at center);
+ offset-distance: 25%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002-ref.html
new file mode 100644
index 00000000000..e56acaaa260
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with no parameters</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(-50px, -50px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002.html
new file mode 100644
index 00000000000..8264abbbca0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-002.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with no parameters</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-circle-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: circle();
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003-ref.html
new file mode 100644
index 00000000000..327d325137c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with offset-distance</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(420.231px, 311.969px) rotate(154.813deg);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003.html
new file mode 100644
index 00000000000..eb00dacab30
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-003.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with offset-distance</title>
+<meta name=fuzzy content="0-10;0-20">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-circle-003-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: circle(farthest-side at top);
+ offset-distance: 18%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004-ref.html
new file mode 100644
index 00000000000..86c67dcdedc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004-ref.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with offset-distance and offset-anchor</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(400px, 199px) translate(-50px, -50px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="inner">
+ <div id="box"></div>
+ </div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004.html
new file mode 100644
index 00000000000..39e80fa861b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-circle-004.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; circle() path with offset-distance and offset-anchor</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-circle-004-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: circle(10% at bottom 25% right 25%);
+ offset-anchor: 100% 100%;
+ offset-distance: 75%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001-ref.html
new file mode 100644
index 00000000000..32236bbc239
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(250px, 350px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001.html
new file mode 100644
index 00000000000..35482636ba1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-001.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with explicit arguments</title>
+<meta name=fuzzy content="0-1;0-200">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-ellipse-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: ellipse(closest-side closest-side at center);
+ offset-distance: 25%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002-ref.html
new file mode 100644
index 00000000000..e3dfaf51227
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with no parameters</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(-50px, -50px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002.html
new file mode 100644
index 00000000000..298e1dd52ed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-002.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with no parameters</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-ellipse-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: ellipse();
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003-ref.html
new file mode 100644
index 00000000000..4a9fed4c86a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with offset-distance</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(393.93px, 300.959px) rotate(143.905deg);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003.html
new file mode 100644
index 00000000000..2b79367b0bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-003.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with offset-distance</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-ellipse-003-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: ellipse(farthest-side farthest-side at top);
+ offset-distance: 18%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004-ref.html
new file mode 100644
index 00000000000..fca4b190db5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004-ref.html
@@ -0,0 +1,27 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with offset-distance and offset-anchor</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ transform: translate(400px, 210px) translate(-50px, -50px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="inner">
+ <div id="box"></div>
+ </div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004.html
new file mode 100644
index 00000000000..2c95415b11f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-ellipse-004.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; ellipse() path with offset-distance and offset-anchor</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-ellipse-004-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: ellipse(10% 10% at bottom 25% right 25%);
+ offset-anchor: 100% 100%;
+ offset-distance: 75%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001-ref.html
new file mode 100644
index 00000000000..52a9662841c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; inset() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(348px, 340px) rotate(180deg);
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html
new file mode 100644
index 00000000000..dd96c42ebb3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-001.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; inset() path with explicit arguments</title>
+<meta name=fuzzy content="0-30;0-200">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-inset-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: inset(10px 10px 10px 10px);
+ offset-distance: 60%;
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002-ref.html
new file mode 100644
index 00000000000..28195129f32
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; inset() path with explicit arguments and radius</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(512.786px, 283.444px) rotate(133.055deg) translate(50px, 50px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002.html
new file mode 100644
index 00000000000..6279cdd35eb
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-inset-002.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; inset() path with explicit arguments and radius</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-inset-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: inset(10px 10px 10px 10px round 30%);
+ offset-anchor: 0 0;
+ offset-distance: 40%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001-ref.html
new file mode 100644
index 00000000000..efaf54c79f2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; polygon() path</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(46px, 78px) rotate(-126.87deg);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001.html
new file mode 100644
index 00000000000..7e9ccdbfda9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-001.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; polygon() path</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-polygon-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: polygon(0px 0px, 600px 0px, 300px 400px);
+ offset-distance: 90%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002-ref.html
new file mode 100644
index 00000000000..1e4c6c689b3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; polygon() path is closed with 2 points</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(550px, 350px) rotate(33.6901deg);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002.html
new file mode 100644
index 00000000000..39352f22be9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-002.html
@@ -0,0 +1,28 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; polygon() path is closed with 2 points</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-polygon-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: polygon(50% 50%, 100% 100%);
+ offset-distance: 150%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003-ref.html
new file mode 100644
index 00000000000..0507f7b45ef
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; polygon() path with points as percentage and pixels</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(479.461px, -2.97412px) rotate(-33.6901deg) translate(40px, 45px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003.html
new file mode 100644
index 00000000000..caa08082e4e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-polygon-003.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; polygon() path with points as percentage and pixels</title>
+<meta name=fuzzy content="0-20;0-50">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-polygon-003-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: polygon(0% 0%, 300px 200px, 100% 0px, 100% 100%, 0px 100%);
+ offset-distance: 30%;
+ offset-anchor: 10px 5%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001-ref.html
new file mode 100644
index 00000000000..2cb45198e95
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; rect() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(520px, 142px) rotate(90deg) translate(40px, 40px);
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001.html
new file mode 100644
index 00000000000..a8a2336cc81
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-001.html
@@ -0,0 +1,30 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; rect() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-rect-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: rect(5px 95% 95% 5px);
+ offset-distance: 40%;
+ offset-anchor: 10% 10%;
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002-ref.html
new file mode 100644
index 00000000000..7e9e07cccf3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; rect() path with explicit arguments and radius</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(420.272px, 317.407px) rotate(161.625deg) translate(40px, 40px);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002.html
new file mode 100644
index 00000000000..c7b60b3660b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-rect-002.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; rect() path with explicit arguments and radius</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-rect-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: rect(5px 95% 95% 5px round 30%);
+ offset-distance: 45%;
+ offset-anchor: 10% 10%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001-ref.html
new file mode 100644
index 00000000000..12f9668dd5c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001-ref.html
@@ -0,0 +1,25 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; xywh() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(260px, 160px) rotate(90deg);
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001.html
new file mode 100644
index 00000000000..ace1ee1c639
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-001.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; xywh() path with explicit arguments</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-xywh-001-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: xywh(10px 10px 300px 200px);
+ offset-distance: 50%;
+ border-radius: 50% 50% 0 0;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002-ref.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002-ref.html
new file mode 100644
index 00000000000..1b672d1d98e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002-ref.html
@@ -0,0 +1,24 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test reference: &lt;basic-shape&gt; xywh() path with explicit arguments and radius</title>
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ transform: translate(40.3141px, 336.647px) rotate(-135.052deg);
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002.html b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002.html
new file mode 100644
index 00000000000..65bf8aa2ee9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/motion/offset-path-shape-xywh-002.html
@@ -0,0 +1,29 @@
+<!doctype html>
+<meta charset="utf-8">
+<title>CSS Motion Path test: &lt;basic-shape&gt; xywh() path with explicit arguments and radius</title>
+<meta name=fuzzy content="0-20;0-20">
+<link rel="author" title="Daniil Sakhapov" href="sakhapov@google.com">
+<link rel="match" href="offset-path-shape-xywh-002-ref.html">
+<link rel="help" href="https://drafts.fxtf.org/motion/#valdef-offset-path-basic-shape">
+
+<style>
+#outer {
+ top: 100px;
+ left: 100px;
+ position: relative;
+ width: 600px;
+ height: 400px;
+}
+#box {
+ background-color: green;
+ position: relative;
+ offset-path: xywh(10% 10% 100% 100% round 30%);
+ offset-distance: 65%;
+ width: 100px;
+ height: 100px;
+}
+</style>
+
+<div id="outer">
+ <div id="box"></div>
+</div>
diff --git a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
index 25915b9a29e..95a9f8aabbc 100644
--- a/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
+++ b/tests/wpt/web-platform-tests/css/motion/parsing/offset-path-parsing-valid.html
@@ -48,7 +48,7 @@ test_valid_value("offset-path", 'path(" ")', ['none', 'path("")']);
test_valid_value("offset-path", 'url("http://www.example.com/index.html#polyline1")');
-test_valid_value("offset-path", "circle(100px)");
+test_valid_value("offset-path", "circle(100px)", "circle(100px at 50% 50%)");
test_valid_value("offset-path", "margin-box");
test_valid_value("offset-path", "inset(10% 20% 30% 40%) border-box");
test_valid_value("offset-path", "fill-box ellipse(50% 60%)", "ellipse(50% 60%) fill-box");
diff --git a/tests/wpt/web-platform-tests/css/printing/transform-001-print-ref.html b/tests/wpt/web-platform-tests/css/printing/transform-001-print-ref.html
new file mode 100644
index 00000000000..45c3abf1810
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/printing/transform-001-print-ref.html
@@ -0,0 +1,8 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<style>
+ body { margin: 0; }
+</style>
+<div style="height:500vh;">
+ There should be 5 pages.
+</div>
diff --git a/tests/wpt/web-platform-tests/css/printing/transform-001-print.html b/tests/wpt/web-platform-tests/css/printing/transform-001-print.html
new file mode 100644
index 00000000000..f19b889d07b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/css/printing/transform-001-print.html
@@ -0,0 +1,11 @@
+<!DOCTYPE html>
+<link rel="author" title="Morten Stenshorne" href="mailto:mstensho@chromium.org">
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1442522">
+<link rel="match" href="transform-001-print-ref.html">
+<style>
+ body { margin: 0; }
+</style>
+<div style="height:0;">
+ There should be 5 pages.
+</div>
+<div style="transform:rotate(180deg); height:500vh;"></div>
diff --git a/tests/wpt/web-platform-tests/custom-elements/connected-callbacks-template.html b/tests/wpt/web-platform-tests/custom-elements/connected-callbacks-template.html
new file mode 100644
index 00000000000..ed404332dbd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/custom-elements/connected-callbacks-template.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<!-- Regression test for https://github.com/jsdom/jsdom/issues/3290 -->
+
+<body>
+<script>
+"use strict";
+
+test(() => {
+ let innerConnectedCallbackCalled = false;
+ customElements.define("inner-element", class extends HTMLElement {
+ connectedCallback() {
+ innerConnectedCallbackCalled = true;
+ }
+ });
+
+ let outerConnectedCallbackCalled = false;
+ customElements.define("outer-element", class extends HTMLElement {
+ connectedCallback() {
+ const template = document.createElement("template");
+ template.innerHTML = "<inner-element></inner-element>";
+ this.appendChild(document.importNode(template.content, true));
+ outerConnectedCallbackCalled = true;
+ }
+ });
+
+ document.body.appendChild(document.createElement("outer-element"));
+ assert_true(innerConnectedCallbackCalled, "inner connectedCallback must be called");
+ assert_true(outerConnectedCallbackCalled, "outer connectedCallback must be called");
+}, "Nested custom element connectedCallback insertion involving a template DocumentFragment");
+</script>
diff --git a/tests/wpt/web-platform-tests/custom-elements/overwritten-customElements-global.html b/tests/wpt/web-platform-tests/custom-elements/overwritten-customElements-global.html
new file mode 100644
index 00000000000..dcb97b66528
--- /dev/null
+++ b/tests/wpt/web-platform-tests/custom-elements/overwritten-customElements-global.html
@@ -0,0 +1,61 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<body>
+<script>
+"use strict";
+
+test(() => {
+ class SomeElement1 extends HTMLElement {}
+ customElements.define("some-element-1", SomeElement1);
+
+ const savedCustomElements = Object.getOwnPropertyDescriptor(window, "customElements");
+ Object.defineProperty(window, "customElements", { value: {}, configurable: true });
+
+ const element = document.createElement("some-element-1");
+ assert_true(element instanceof SomeElement1);
+
+ Object.defineProperty(window, "customElements", savedCustomElements);
+}, "Custom elements can still be created after `window.customElements` is overwritten.");
+
+test(() => {
+ class SomeElement2 extends HTMLElement {}
+ customElements.define("some-element-2", SomeElement2);
+
+ const savedCustomElements = Object.getOwnPropertyDescriptor(window, "customElements");
+ Object.defineProperty(window, "customElements", { value: {}, configurable: true });
+
+ const element = new SomeElement2();
+ assert_true(element instanceof SomeElement2);
+
+ Object.defineProperty(window, "customElements", savedCustomElements);
+}, "Custom elements can still be constructed after `window.customElements` is overwritten.");
+
+test(() => {
+ class SomeElement3 extends HTMLElement {}
+ customElements.define("some-element-3", SomeElement3);
+
+ const savedCustomElements = Object.getOwnPropertyDescriptor(window, "customElements");
+ delete window.customElements;
+
+ const element = document.createElement("some-element-3");
+ assert_true(element instanceof SomeElement3);
+
+ Object.defineProperty(window, "customElements", savedCustomElements);
+}, "Custom elements can still be created after `window.customElements` is deleted.");
+
+test(() => {
+ class SomeElement4 extends HTMLElement {}
+ customElements.define("some-element-4", SomeElement4);
+
+ const savedCustomElements = Object.getOwnPropertyDescriptor(window, "customElements");
+ delete window.customElements;
+
+ const element = new SomeElement4();
+ assert_true(element instanceof SomeElement4);
+
+ Object.defineProperty(window, "customElements", savedCustomElements);
+}, "Custom elements can still be constructed after `window.customElements` is deleted.");
+</script>
diff --git a/tests/wpt/web-platform-tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html
new file mode 100644
index 00000000000..e21c9dd0332
--- /dev/null
+++ b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/ShadowRoot-innerHTML-upgrade.tentative.html
@@ -0,0 +1,116 @@
+<!DOCTYPE html>
+<meta name="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
+<meta name="assert" content="Custom element constructors can re-enter with different definitions">
+<link rel="help" href="https://wicg.github.io/webcomponents/proposals/Scoped-Custom-Element-Registries">
+<link rel="help" href="https://github.com/WICG/webcomponents/issues/969">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id="testdiv"></div>
+
+<script>
+class TestAutonomous extends HTMLElement {};
+class TestCustomizedBuiltIn extends HTMLParagraphElement {};
+
+function attachShadowForTest(t, registry) {
+ const host = document.createElement('div');
+ const shadow = host.attachShadow({mode: 'open', registry});
+ document.body.appendChild(host);
+ t.add_cleanup(() => host.remove());
+ return shadow;
+}
+
+test(t => {
+ const registry = new CustomElementRegistry;
+ registry.define('test-element', TestAutonomous);
+
+ const shadow = attachShadowForTest(t, registry);
+ shadow.innerHTML = '<test-element></test-element>';
+ assert_true(shadow.firstChild instanceof TestAutonomous, 'target tree scope');
+
+ // Verify that it doesn't pollute other tree scopes.
+ const shadow2 = attachShadowForTest(t);
+ shadow2.innerHTML = '<test-element></test-element>';
+ assert_false(shadow2.firstChild instanceof TestAutonomous, 'tree scope without registry');
+
+ const shadow3 = attachShadowForTest(t, new CustomElementRegistry);
+ shadow3.innerHTML = '<test-element></test-element>';
+ assert_false(shadow3.firstChild instanceof TestAutonomous, 'tree scope with different registry');
+
+ t.add_cleanup(() => testdiv.firstChild.remove());
+ testdiv.innerHTML = '<test-element></test-element>';
+ assert_false(testdiv.firstChild instanceof TestAutonomous, 'main document');
+}, 'Upgrade into autonomous custom element when inserted via innerHTML');
+
+test(t => {
+ const registry = new CustomElementRegistry;
+ const shadow = attachShadowForTest(t, registry);
+ shadow.innerHTML = '<test-element></test-element>';
+
+ const shadow2 = attachShadowForTest(t);
+ shadow2.innerHTML = '<test-element></test-element>';
+
+ const shadow3 = attachShadowForTest(t, new CustomElementRegistry);
+ shadow3.innerHTML = '<test-element></test-element>';
+
+ t.add_cleanup(() => testdiv.firstChild.remove());
+ testdiv.innerHTML = '<test-element></test-element>';
+
+ registry.define('test-element', TestAutonomous);
+
+ // Elements in the target tree scope should be upgraded.
+ assert_true(shadow.firstChild instanceof TestAutonomous, 'target tree scope');
+
+ // Verify that it doesn't pollute other tree scopes.
+ assert_false(shadow2.firstChild instanceof TestAutonomous, 'tree scope without registry');
+ assert_false(shadow3.firstChild instanceof TestAutonomous, 'tree scope with different registry');
+ assert_false(testdiv.firstChild instanceof TestAutonomous, 'main document');
+}, 'Upgrade into autonomous custom element when definition is added');
+
+test(t => {
+ const registry = new CustomElementRegistry;
+ registry.define('test-element', TestCustomizedBuiltIn, {extends: 'p'});
+
+ const shadow = attachShadowForTest(t, registry);
+ shadow.innerHTML = '<p is="test-element"></p>';
+ assert_true(shadow.firstChild instanceof TestCustomizedBuiltIn, 'target tree scope');
+
+ // Verify that it doesn't pollute other tree scopes.
+ const shadow2 = attachShadowForTest(t);
+ shadow2.innerHTML = '<p is="test-element"></p>';
+ assert_false(shadow2.firstChild instanceof TestCustomizedBuiltIn, 'tree scope without registry');
+
+ const shadow3 = attachShadowForTest(t, new CustomElementRegistry);
+ shadow3.innerHTML = '<p is="test-element"></p>';
+ assert_false(shadow3.firstChild instanceof TestCustomizedBuiltIn, 'tree scope with different registry');
+
+ t.add_cleanup(() => testdiv.firstChild.remove());
+ testdiv.innerHTML = '<p is="test-element"></p>';
+ assert_false(testdiv.firstChild instanceof TestCustomizedBuiltIn, 'main document');
+}, 'Upgrade into customized built-in element when inserted via innerHTML');
+
+test(t => {
+ const registry = new CustomElementRegistry;
+ const shadow = attachShadowForTest(t, registry);
+ shadow.innerHTML = '<p is="test-element"></p>';
+
+ const shadow2 = attachShadowForTest(t);
+ shadow2.innerHTML = '<p is="test-element"></p>';
+
+ const shadow3 = attachShadowForTest(t, new CustomElementRegistry);
+ shadow3.innerHTML = '<p is="test-element"></p>';
+
+ t.add_cleanup(() => testdiv.firstChild.remove());
+ testdiv.innerHTML = '<p is="test-element"></p>';
+
+ registry.define('test-element', TestCustomizedBuiltIn, {extends: 'p'});
+
+ // Elements in the target tree scope should be upgraded.
+ assert_true(shadow.firstChild instanceof TestCustomizedBuiltIn, 'target tree scope');
+
+ // Verify that it doesn't pollute other tree scopes.
+ assert_false(shadow2.firstChild instanceof TestCustomizedBuiltIn, 'tree scope without registry');
+ assert_false(shadow3.firstChild instanceof TestCustomizedBuiltIn, 'tree scope with different registry');
+ assert_false(testdiv.firstChild instanceof TestCustomizedBuiltIn, 'main document');
+}, 'Upgrade into customized built-in element when definition is added');
+</script>
diff --git a/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-call.tentative.html b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-call.tentative.html
new file mode 100644
index 00000000000..19a8e3f4d8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-call.tentative.html
@@ -0,0 +1,42 @@
+<!DOCTYPE html>
+<meta name="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
+<meta name="assert" content="Direct calls of custom element constructor use the global registry only">
+<link rel="help" href="https://wicg.github.io/webcomponents/proposals/Scoped-Custom-Element-Registries">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<body>
+<script>
+function attachShadowForTest(t, registry) {
+ const host = document.createElement('div');
+ const shadow = host.attachShadow({mode: 'open', registry});
+ document.body.appendChild(host);
+ t.add_cleanup(() => host.remove());
+ return shadow;
+}
+
+test(t => {
+ class TestElement extends HTMLElement {};
+ let registry = new CustomElementRegistry()
+ registry.define('test-element', TestElement);
+
+ let shadow = attachShadowForTest(t, registry);
+
+ assert_throws_js(TypeError, () => new TestElement);
+}, 'Calling custom element constructor directly without global registration should fail');
+
+test(t => {
+ class TestElement extends HTMLElement {};
+
+ window.customElements.define('global-test-element', TestElement);
+
+ let registry = new CustomElementRegistry()
+ registry.define('shadow-test-element', TestElement);
+ let shadow = attachShadowForTest(t, registry);
+
+ let element = new TestElement;
+ assert_equals(element.localName, 'global-test-element');
+}, 'Calling custom element constructor directly uses global registration only');
+
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html
new file mode 100644
index 00000000000..dc93e3c702d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/custom-elements/scoped-registry/constructor-reentry-with-different-definition.tentative.html
@@ -0,0 +1,137 @@
+<!DOCTYPE html>
+<meta name="author" title="Xiaocheng Hu" href="mailto:xiaochengh@chromium.org">
+<meta name="assert" content="Custom element constructors can re-enter with different definitions">
+<link rel="help" href="https://wicg.github.io/webcomponents/proposals/Scoped-Custom-Element-Registries">
+<link rel="help" href="https://github.com/WICG/webcomponents/issues/969">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+
+<div id='test-container-1'></div>
+<div id='test-container-2'></div>
+
+<script>
+setup({allow_uncaught_exception : true});
+
+function createShadowForTest(t, registry) {
+ const host = document.createElement('div');
+ const shadow = host.attachShadow({mode: 'open', registry});
+ document.body.appendChild(host);
+ t.add_cleanup(() => host.remove());
+ return shadow;
+}
+
+test(t => {
+ let needsTest = true;
+ class ReentryBeforeSuper extends HTMLElement {
+ constructor() {
+ if (needsTest) {
+ needsTest = false;
+ document.getElementById('test-container-1').innerHTML =
+ '<test-element-1></test-element-1>';
+ }
+ super();
+ }
+ };
+ window.customElements.define('test-element-1', ReentryBeforeSuper);
+
+ let registry = new CustomElementRegistry;
+ registry.define('shadow-test-element-1', ReentryBeforeSuper);
+
+ let shadow = createShadowForTest(t, registry);
+ shadow.innerHTML = '<shadow-test-element-1></shadow-test-element-1>';
+
+ let shadowElement = shadow.firstChild;
+ assert_true(shadowElement instanceof ReentryBeforeSuper);
+ assert_equals(shadowElement.localName, 'shadow-test-element-1');
+
+ let mainDocElement = document.getElementById('test-container-1').firstChild;
+ assert_true(mainDocElement instanceof ReentryBeforeSuper);
+ assert_equals(mainDocElement.localName, 'test-element-1');
+}, 'Re-entry via upgrade before calling super()');
+
+test(t => {
+ let needsTest = true;
+ class ReentryAfterSuper extends HTMLElement {
+ constructor() {
+ super();
+ if (needsTest) {
+ needsTest = false;
+ document.getElementById('test-container-2').innerHTML =
+ '<test-element-2></test-element-2>';
+ }
+ }
+ };
+ window.customElements.define('test-element-2', ReentryAfterSuper);
+
+ let registry = new CustomElementRegistry;
+ registry.define('shadow-test-element-2', ReentryAfterSuper);
+
+ let shadow = createShadowForTest(t, registry);
+ shadow.innerHTML = '<shadow-test-element-2></shadow-test-element-2>';
+
+ let shadowElement = shadow.firstChild;
+ assert_true(shadowElement instanceof ReentryAfterSuper);
+ assert_equals(shadowElement.localName, 'shadow-test-element-2');
+
+ let mainDocElement = document.getElementById('test-container-2').firstChild;
+ assert_true(mainDocElement instanceof ReentryAfterSuper);
+ assert_equals(mainDocElement.localName, 'test-element-2');
+}, 'Re-entry via upgrade after calling super()');
+
+test(t => {
+ let needsTest = true;
+ let elementByNestedCall;
+ class ReentryByDirectCall extends HTMLElement {
+ constructor() {
+ if (needsTest) {
+ needsTest = false;
+ elementByNestedCall = new ReentryByDirectCall;
+ }
+ super();
+ }
+ }
+ window.customElements.define('test-element-3', ReentryByDirectCall);
+
+ let registry = new CustomElementRegistry;
+ registry.define('shadow-test-element-3', ReentryByDirectCall);
+
+ let shadow = createShadowForTest(t, registry);
+ shadow.innerHTML = '<shadow-test-element-3></shadow-test-element-3>';
+
+ let shadowElement = shadow.firstChild;
+ assert_true(shadowElement instanceof ReentryByDirectCall);
+ assert_equals(shadowElement.localName, 'shadow-test-element-3');
+
+ // Nested constructor call makes the following `super()` fail, and we should
+ // end up creating only one element.
+ assert_equals(elementByNestedCall, shadowElement);
+}, 'Re-entry via direct constructor call before calling super()');
+
+test(t => {
+ let needsTest = true;
+ let elementByNestedCall;
+ class ReentryByDirectCall extends HTMLElement {
+ constructor() {
+ super();
+ if (needsTest) {
+ needsTest = false;
+ elementByNestedCall = new ReentryByDirectCall;
+ }
+ }
+ }
+ window.customElements.define('test-element-4', ReentryByDirectCall);
+
+ let registry = new CustomElementRegistry;
+ registry.define('shadow-test-element-4', ReentryByDirectCall);
+
+ let shadow = createShadowForTest(t, registry);
+ shadow.innerHTML = '<shadow-test-element-4></shadow-test-element-4>';
+
+ let shadowElement = shadow.firstChild;
+ assert_true(shadowElement instanceof ReentryByDirectCall);
+ assert_equals(shadowElement.localName, 'shadow-test-element-4');
+
+ // Nested constructor call should be blocked.
+ assert_false(elementByNestedCall instanceof ReentryByDirectCall);
+}, 'Re-entry via direct constructor call after calling super()');
+</script>
diff --git a/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js b/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.any.js
index b4abb14c1a3..b4abb14c1a3 100644
--- a/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.tentative.any.js
+++ b/tests/wpt/web-platform-tests/dom/abort/abort-signal-any.any.js
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html
index faebeec26c4..f5084cf3861 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-all.https.html
@@ -12,10 +12,14 @@
<script>
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN,
+ generator_api="sharedstorage");
}, 'Same-origin fenced frame loads when feature policies are *');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, true, get_host_info().REMOTE_ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, true, get_host_info().REMOTE_ORIGIN,
+ generator_api="sharedstorage");
}, 'Cross-origin fenced frame loads when feature policies are *');
</script>
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html
index a338e00c874..d44cb5bca77 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-none.https.html
@@ -10,6 +10,8 @@
<body>
<script>
+// Note: Shared storage will refuse to run selectURL() on this page because its
+// permissions policy is disabled. Therefore, we can only test the FLEDGE case.
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, false, get_host_info().ORIGIN);
}, 'Same-origin fenced frame does not load when feature policies are none');
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html
index d59ee7fcdc8..0360963a0b8 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-allow-self.https.html
@@ -12,32 +12,32 @@
<script>
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, true, get_host_info().ORIGIN,
+ generator_api="sharedstorage");
}, 'Same-origin fenced frame loads when feature policies are self');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, false, get_host_info().REMOTE_ORIGIN,
+ generator_api="sharedstorage");
}, 'Cross-origin fenced frame does not load when feature policies are self');
promise_test(async(t) => {
const fencedframe = await attachFencedFrameContext({
- generator_api: "sharedstorage",
origin: get_host_info().ORIGIN});
await fencedframe.execute(async () => {
- assert_true(document.featurePolicy.allowsFeature('attribution-reporting'),
- "Attribution reporting should be allowed in the outer fenced frame.");
- const fencedframe_inner = await attachFencedFrameContext({
- generator_api: "sharedstorage",
- origin: get_host_info().REMOTE_ORIGIN});
-
- await fencedframe_inner.execute(async () => {
- assert_true(
- document.featurePolicy.allowsFeature('attribution-reporting'),
- "Attribution reporting should be allowed in the nested fenced " +
- "frame that's cross origin to its embedder.");
- }, []);
+ assert_false(
+ document.featurePolicy.allowsFeature('shared-storage'),
+ "Shared storage should be disallowed in the fenced frame.");
+ assert_false(
+ document.featurePolicy.allowsFeature('attribution-reporting'),
+ "Attribution reporting should be disallowed in the fenced frame.");
+ assert_false(
+ document.featurePolicy.allowsFeature('sync-xhr'),
+ "USB access should be disallowed in the fenced frame.");
}, []);
-}, 'Fenced frames default feature policies are set to allow *');
+}, 'Fenced frames default feature policies are set to not allow anything.');
promise_test(async(t) => {
// We do this test the "old fashioned way" because a redirect in a fenced
@@ -46,8 +46,10 @@ promise_test(async(t) => {
const page1_key = token();
const redirect_key = token();
- const urn = await generateURNFromFledge("resources/default-enabled-features-redirect.https.html", [page1_key, redirect_key]);
- const fencedframe = attachFencedFrame(urn);
+ const fencedframe = attachFencedFrame(
+ await generateURNFromFledge(
+ "resources/default-enabled-features-redirect.https.html",
+ [page1_key, redirect_key]));
// The fenced frame will send its attribution reporting result and then
// attempt to redirect to a remote origin page.
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html
index dd6dd4ec502..3c3831f0157 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-allow.https.html
@@ -13,12 +13,22 @@
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
get_host_info().ORIGIN,
+ generator_api="fledge",
+ allow="shared-storage *; attribution-reporting *");
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
+ get_host_info().ORIGIN,
+ generator_api="sharedstorage",
allow="shared-storage *; attribution-reporting *");
}, 'Same-origin fenced frame with allow attribute enabling required features');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
get_host_info().REMOTE_ORIGIN,
+ generator_api="fledge",
+ allow="shared-storage *; attribution-reporting *");
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
+ get_host_info().REMOTE_ORIGIN,
+ generator_api="sharedstorage",
allow="shared-storage *; attribution-reporting *");
}, 'Cross-origin fenced frame with allow attribute enabling required features');
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html
index 179a8683e32..9878e615adb 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-change.https.html
@@ -12,8 +12,8 @@
<script>
promise_test(async(t) => {
const fencedframe = await attachFencedFrameContext({
- generator_api: "sharedstorage",
- attributes: [["allow", "shared-storage *; attribution-reporting *"]],
+ generator_api: 'fledge',
+ attributes: [["allow", "attribution-reporting *"]],
origin: get_host_info().ORIGIN});
fencedframe.element.allow = "attribution-reporting 'none'";
@@ -26,8 +26,8 @@ promise_test(async(t) => {
promise_test(async(t) => {
const fencedframe = await attachFencedFrameContext({
- generator_api: "sharedstorage",
- attributes: [["allow", "shared-storage *; attribution-reporting *"]],
+ generator_api: 'fledge',
+ attributes: [["allow", "attribution-reporting *"]],
origin: get_host_info().ORIGIN});
fencedframe.element.allow = "attribution-reporting 'none'";
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html
index 29fdc788bf5..f9ef9b6db24 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribute-disallow.https.html
@@ -12,12 +12,20 @@
<script>
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
- get_host_info().ORIGIN, allow="shared-storage 'none'");
+ get_host_info().ORIGIN, generator_api="fledge",
+ allow="private-aggregation 'none'");
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
+ get_host_info().ORIGIN, generator_api="sharedstorage",
+ allow="shared-storage 'none'");
}, 'Same-origin fenced frame with allow attribute disabling required feature');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
- get_host_info().REMOTE_ORIGIN, allow="shared-storage 'none'");
+ get_host_info().REMOTE_ORIGIN, generator_api="fledge",
+ allow="private-aggregation 'none'");
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
+ get_host_info().REMOTE_ORIGIN, generator_api="sharedstorage",
+ allow="shared-storage 'none'");
}, 'Cross-origin fenced frame with allow attribute disabling required feature');
</script>
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html
index 7683b35a699..9e037e24a3e 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-attribution-disabled.https.html
@@ -12,15 +12,15 @@
<script>
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
- get_host_info().ORIGIN,
- allow="attribution-reporting *; shared-storage *;");
+ get_host_info().ORIGIN, generator_api="fledge",
+ allow="attribution-reporting *;");
}, 'Same-origin fenced frame with allow attribute enabling required feature ' +
'but page disabling feature.');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/false,
- get_host_info().REMOTE_ORIGIN,
- allow="attribution-reporting *; shared-storage *;");
+ get_host_info().REMOTE_ORIGIN, generator_api="fledge",
+ allow="attribution-reporting *;");
}, 'Cross-origin fenced frame with allow attribute enabling required feature ' +
'but page disabling feature.');
</script>
diff --git a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html
index 0e9c300bdcb..b438d1ff35a 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html
+++ b/tests/wpt/web-platform-tests/fenced-frame/default-enabled-features-unset.https.html
@@ -13,11 +13,15 @@
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
get_host_info().ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
+ get_host_info().ORIGIN, generator_api="sharedstorage");
}, 'Same-origin fenced frame loads when feature policies are unset');
promise_test(async(t) => {
await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
get_host_info().REMOTE_ORIGIN);
+ await runDefaultEnabledFeaturesTest(t, /*should_load=*/true,
+ get_host_info().REMOTE_ORIGIN, generator_api="sharedstorage");
}, 'Cross-origin fenced frame loads when feature policies are unset');
</script>
diff --git a/tests/wpt/web-platform-tests/fenced-frame/resolve-to-config-promise.https.html b/tests/wpt/web-platform-tests/fenced-frame/resolve-to-config-promise.https.html
new file mode 100644
index 00000000000..97df37ef2bc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/fenced-frame/resolve-to-config-promise.https.html
@@ -0,0 +1,80 @@
+<!DOCTYPE html>
+<title>Test setting auction config's resolveToConfig to a promise</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/common/utils.js"></script>
+<script src="/common/dispatcher/dispatcher.js"></script>
+<script src="resources/utils.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+<script src="resources/default-enabled-features-helper.js"></script>
+
+<body>
+<script>
+// To simulate the time it takes for a promise to resolve, we use a simple
+// timeout that eventually resolves to a boolean.
+function delayValue(value, timeout) {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ resolve(value);
+ }, timeout);
+ });
+}
+
+promise_test(async(t) => {
+ const key = token();
+
+ const urn = await generateURNFromFledge("resources/embeddee.html", [key],
+ [], delayValue(true, 500));
+ assert_true(urn instanceof FencedFrameConfig);
+ const fencedframe = attachFencedFrame(urn);
+
+ const page1_resp = await nextValueFromServer(key);
+ assert_equals(page1_resp, "PASS",
+ "The page should have loaded.");
+}, 'resolveToConfig set to a promise that resolves to true');
+
+promise_test(async(t) => {
+ const key = token();
+
+ const urn = await generateURNFromFledge("resources/embeddee.html", [key],
+ [], delayValue(false, 500));
+ assert_false(urn instanceof FencedFrameConfig);
+ const fencedframe = attachFencedFrame(urn);
+
+ const page1_resp = await nextValueFromServer(key);
+ assert_equals(page1_resp, "PASS",
+ "The page should have loaded.");
+}, 'resolveToConfig set to a promise that resolves to false');
+
+promise_test(async(t) => {
+ // This tests the case where the resolveToConfig promise resolves before
+ // the auction finishes
+ const key = token();
+
+ const urn = await generateURNFromFledge("resources/embeddee.html", [key],
+ [], delayValue(true, 0));
+ assert_true(urn instanceof FencedFrameConfig);
+ const fencedframe = attachFencedFrame(urn);
+
+ const page1_resp = await nextValueFromServer(key);
+ assert_equals(page1_resp, "PASS",
+ "The page should have loaded.");
+}, 'resolveToConfig set to a promise that immediately resolves');
+
+promise_test(async(t) => {
+ const key = token();
+
+ // This should still resolve, but resolve to a URN.
+ const urn = await generateURNFromFledge("resources/embeddee.html", [key],
+ [], delayValue("invalid", 0));
+ assert_false(urn instanceof FencedFrameConfig);
+ const fencedframe = attachFencedFrame(urn);
+
+ const page1_resp = await nextValueFromServer(key);
+ assert_equals(page1_resp, "PASS",
+ "The page should have loaded.");
+}, 'resolveToConfig set to a promise that resolves to an invalid value');
+
+</script>
+</body>
+</html>
diff --git a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js
index d7eb3c63bef..821ebf69e36 100644
--- a/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js
+++ b/tests/wpt/web-platform-tests/fenced-frame/resources/default-enabled-features-helper.js
@@ -7,9 +7,10 @@
// <script src="resources/utils.js"></script>
// <script src="/common/get-host-info.sub.js"></script>
-async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin, allow="") {
+async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin,
+ generator_api="fledge", allow="") {
const fencedframe = await attachFencedFrameContext({
- generator_api: "fledge",
+ generator_api: generator_api,
attributes: [["allow", allow]],
origin: fenced_origin});
@@ -23,14 +24,22 @@ async function runDefaultEnabledFeaturesTest(t, should_load, fenced_origin, allo
return;
}
- await fencedframe.execute(() => {
+ await fencedframe.execute((generator_api) => {
assert_true(
document.featurePolicy.allowsFeature('attribution-reporting'),
"Attribution reporting should be allowed if the fenced " +
- "frame loaded.");
- assert_true(
- document.featurePolicy.allowsFeature('shared-storage'),
- "Shared storage should be allowed if the fenced " +
- "frame loaded.");
- });
+ "frame loaded using FLEDGE or shared storage.");
+
+ if (generator_api == "fledge") {
+ assert_false(
+ document.featurePolicy.allowsFeature('shared-storage'),
+ "Shared storage should be disallowed if the fenced " +
+ "frame loaded using FLEDGE.");
+ } else {
+ assert_true(
+ document.featurePolicy.allowsFeature('shared-storage'),
+ "Shared storage should be allowed if the fenced " +
+ "frame loaded using shared storage.");
+ }
+ }, [generator_api]);
}
diff --git a/tests/wpt/web-platform-tests/fs/script-tests/FileSystemBaseHandle-buckets.js b/tests/wpt/web-platform-tests/fs/script-tests/FileSystemBaseHandle-buckets.js
index 01c41231808..c06e940d7e9 100644
--- a/tests/wpt/web-platform-tests/fs/script-tests/FileSystemBaseHandle-buckets.js
+++ b/tests/wpt/web-platform-tests/fs/script-tests/FileSystemBaseHandle-buckets.js
@@ -21,3 +21,22 @@ directory_test(async (t, root_dir) => {
const directoryPromise = inboxBucket.getDirectory();
await promise_rejects_dom(t, 'InvalidStateError', directoryPromise);
}, 'getDirectory promise rejects if bucket has been deleted');
+
+directory_test(async (t, root_dir) => {
+ await prepareForBucketTest(t);
+
+ const inboxBucket = await navigator.storageBuckets.open('inbox', {quota: 500});
+ const inboxRootDir = await inboxBucket.getDirectory();
+
+ // Short file succeeds.
+ const file =
+ await createFileWithContents(t, 'mtime.txt', 'short file', inboxRootDir);
+
+ // Longer file fails.
+ return promise_rejects_dom(
+ t, 'QuotaExceededError',
+ createFileWithContents(
+ t, 'mtime2.txt',
+ 'Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum',
+ inboxRootDir));
+}, 'Bucket quota restricts the size of a file that can be created');
diff --git a/tests/wpt/web-platform-tests/fs/script-tests/FileSystemWritableFileStream-write.js b/tests/wpt/web-platform-tests/fs/script-tests/FileSystemWritableFileStream-write.js
index 43c8ec7ca87..a91a206b868 100644
--- a/tests/wpt/web-platform-tests/fs/script-tests/FileSystemWritableFileStream-write.js
+++ b/tests/wpt/web-platform-tests/fs/script-tests/FileSystemWritableFileStream-write.js
@@ -104,6 +104,19 @@ directory_test(async (t, root) => {
}, 'write() called with a string and a valid offset');
directory_test(async (t, root) => {
+ const handle = await createEmptyFile(t, 'write_string_with_offset_after_seek', root);
+ const stream = await handle.createWritable();
+
+ await stream.write('1234567890');
+ await stream.write({type: 'seek', position: 0});
+ await stream.write({type: 'write', position: 4, data: 'abc'});
+ await stream.close();
+
+ assert_equals(await getFileContents(handle), '1234abc890');
+ assert_equals(await getFileSize(handle), 10);
+}, 'write() called with a string and a valid offset after seek');
+
+directory_test(async (t, root) => {
const handle = await createEmptyFile(t, 'blob_with_offset', root);
const stream = await handle.createWritable();
diff --git a/tests/wpt/web-platform-tests/html-aam/roles.html b/tests/wpt/web-platform-tests/html-aam/roles.html
index c5cb3e35487..5144fe3f0fb 100644
--- a/tests/wpt/web-platform-tests/html-aam/roles.html
+++ b/tests/wpt/web-platform-tests/html-aam/roles.html
@@ -98,7 +98,7 @@
<hgroup data-testname="el-hgroup" data-expectedrole="group" class="ex"><h1>x</h1></hgroup>
<hr data-testname="el-hr" data-expectedrole="separator" class="ex">
<!-- todo: html -->
-<i data-testname="el-i" data-expectedrole="generic" class="ex">x</i>
+<i data-testname="el-i" data-expectedrole="emphasis" class="ex">x</i>
<!-- todo: iframe -->
<img src="#" alt="x" data-testname="el-img" data-expectedrole="image" class="ex">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html
index 2ae3d662f08..525a56ebc9d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvas.html
@@ -19,19 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = 100;
+ canvas2.height = 50;
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.drawImage(canvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html
index 1f3e6299ba0..17a46cfca22 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvascopy.html
@@ -19,21 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-var canvas2 = document.createElement('canvas');
-canvas2.width = 100;
-canvas2.height = 50;
-var ctx2 = canvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.globalCompositeOperation = 'copy'
-ctx.globalAlpha = 0.51;
-ctx.drawImage(canvas2, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
-
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = 100;
+ canvas2.height = 50;
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.globalCompositeOperation = 'copy'
+ ctx.globalAlpha = 0.51;
+ ctx.drawImage(canvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html
index e861cddf302..eea076c974d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.canvaspattern.html
@@ -19,20 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = 100;
+ canvas2.height = 50;
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = ctx.createPattern(canvas2, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html
index a8aa19162af..97cdf267c7c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.default.html
@@ -19,8 +19,7 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
-
+ _assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html
index fce9b7fbfc3..5766fdbe77c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.fill.html
@@ -19,13 +19,13 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html
index deb13f34160..5de1d5ff3ee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.image.html
@@ -16,17 +16,22 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html
index 06aea4c0295..87e884524e8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.imagepattern.html
@@ -16,18 +16,23 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html
index e5a3dd66960..db67f882f66 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.invalid.html
@@ -19,15 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-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 = Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = NaN;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ ctx.globalAlpha = Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = NaN;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html
index ab041864010..883b0cac69a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.globalAlpha.range.html
@@ -19,17 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-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;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -0.1;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = 0;
-_assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
-ctx.globalAlpha = 1;
-_assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
-
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 1.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -0.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 0;
+ _assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
+ ctx.globalAlpha = 1;
+ _assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html
index 96e7d597a76..13ae99b35f9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.casesensitive.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'Source-over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'Source-over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.clear.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.clear.html
index 99d8e1d92f8..c1e88b4894e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.clear.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.clear.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'clear';
-_assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'clear';
+ _assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.darker.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.darker.html
index 4bf5878d9bb..4fb6998f71d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.darker.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.darker.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'darker';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'darker';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.default.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.default.html
index ff0ab69cc41..5ccd488b3c7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.default.html
@@ -19,8 +19,7 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
-
+ _assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.get.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.get.html
index 4831ae77304..27b89c9fedf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.get.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.get.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
- 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
- 'lighter', 'copy', 'xor'];
-for (var i = 0; i < modes.length; ++i)
-{
- ctx.globalCompositeOperation = modes[i];
- _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
-}
-
+ var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
+ 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
+ 'lighter', 'copy', 'xor'];
+ for (var i = 0; i < modes.length; ++i)
+ {
+ ctx.globalCompositeOperation = modes[i];
+ _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.highlight.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.highlight.html
index 88fe7ff37a6..45c5dd15ebb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.highlight.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.highlight.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'highlight';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'highlight';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html
index 7998d725332..8a2443ff41d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.nullsuffix.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'source-over\0';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'source-over\0';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.over.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.over.html
index bc286190fb1..1d742ef3cc4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.over.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.over.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html
index 90f098a6853..e4aa877d96f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/compositing/2d.composite.operation.unrecognised.html
@@ -19,10 +19,9 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'nonexistent';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'nonexistent';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html
index fed4aa61ba9..cea531f9dbb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.basics.html
@@ -19,43 +19,42 @@
var t = async_test("void methods return undefined");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
-_assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
-_assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
-_assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
-_assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
-}
-if (ctx.setTransform) {
- _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
- _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
-}
-_assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
-_assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
-_assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
-_assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
-_assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
-_assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
-_assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
-_assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
-_assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
-if (ctx.fillText) {
- _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
- _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
-}
-if (ctx.putImageData) {
- _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
-}
-_assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
-
+ _assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
+ _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
+ _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
+ _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
+ _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
+ }
+ if (ctx.setTransform) {
+ _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
+ _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
+ }
+ _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
+ _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
+ _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
+ _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
+ _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
+ _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
+ _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
+ _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
+ _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
+ if (ctx.fillText) {
+ _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
+ _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
+ }
+ if (ctx.putImageData) {
+ _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
+ }
+ _assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html
index bfdf94319b4..a33cc869d62 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.delete.html
@@ -19,10 +19,9 @@
var t = async_test("window.CanvasRenderingContext2D is Configurable");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
-_assertSame(delete window.CanvasRenderingContext2D, true, "delete window.CanvasRenderingContext2D", "true");
-_assertSame(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
-
+ _assertDifferent(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
+ _assertSame(delete window.CanvasRenderingContext2D, true, "delete window.CanvasRenderingContext2D", "true");
+ _assertSame(window.CanvasRenderingContext2D, undefined, "window.CanvasRenderingContext2D", "undefined");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html
index 40038b21910..efdad2eab9c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.drawings.html
@@ -19,8 +19,7 @@
var t = async_test("void methods return undefined");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
-
+ _assertSame(ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(document.getElementById('yellow.png'), 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html
index 2ac3d58f4e3..6744c6c3814 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/conformance-requirements/2d.conformance.requirements.missingargs.html
@@ -19,122 +19,121 @@
var t = async_test("Missing arguments cause TypeError");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.scale(); });
-assert_throws_js(TypeError, function() { ctx.scale(1); });
-assert_throws_js(TypeError, function() { ctx.rotate(); });
-assert_throws_js(TypeError, function() { ctx.translate(); });
-assert_throws_js(TypeError, function() { ctx.translate(0); });
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- assert_throws_js(TypeError, function() { ctx.transform(); });
- assert_throws_js(TypeError, function() { ctx.transform(1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
-}
-if (ctx.setTransform) {
- assert_throws_js(TypeError, function() { ctx.setTransform(1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
-}
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
-assert_throws_js(TypeError, function() { ctx.clearRect(); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.moveTo(); });
-assert_throws_js(TypeError, function() { ctx.moveTo(0); });
-assert_throws_js(TypeError, function() { ctx.lineTo(); });
-assert_throws_js(TypeError, function() { ctx.lineTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(); });
-assert_throws_js(TypeError, function() { ctx.rect(0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(); });
-assert_throws_js(TypeError, function() { ctx.arc(0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
-// (6th argument to arc is optional)
-if (ctx.isPointInPath) {
- assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
- assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
-}
-if (ctx.drawFocusRing) {
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
-}
-if (ctx.fillText) {
- assert_throws_js(TypeError, function() { ctx.fillText(); });
- assert_throws_js(TypeError, function() { ctx.fillText('test'); });
- assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.strokeText(); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.measureText(); });
-}
-assert_throws_js(TypeError, function() { ctx.drawImage(); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
-// TODO: n >= 3 args on drawImage could be either a valid overload,
-// or too few for another overload, or too many for another
-// overload - what should happen?
-if (ctx.createImageData) {
- assert_throws_js(TypeError, function() { ctx.createImageData(); });
- assert_throws_js(TypeError, function() { ctx.createImageData(1); });
-}
-if (ctx.getImageData) {
- assert_throws_js(TypeError, function() { ctx.getImageData(); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
-}
-if (ctx.putImageData) {
- var imgdata = ctx.getImageData(0, 0, 1, 1);
- assert_throws_js(TypeError, function() { ctx.putImageData(); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
-}
-var g = ctx.createLinearGradient(0, 0, 0, 0);
-assert_throws_js(TypeError, function() { g.addColorStop(); });
-assert_throws_js(TypeError, function() { g.addColorStop(0); });
-
+ assert_throws_js(TypeError, function() { ctx.scale(); });
+ assert_throws_js(TypeError, function() { ctx.scale(1); });
+ assert_throws_js(TypeError, function() { ctx.rotate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(0); });
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ assert_throws_js(TypeError, function() { ctx.transform(); });
+ assert_throws_js(TypeError, function() { ctx.transform(1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
+ }
+ if (ctx.setTransform) {
+ assert_throws_js(TypeError, function() { ctx.setTransform(1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
+ }
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(); });
+ assert_throws_js(TypeError, function() { ctx.rect(0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(); });
+ assert_throws_js(TypeError, function() { ctx.arc(0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
+ // (6th argument to arc is optional)
+ if (ctx.isPointInPath) {
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
+ }
+ if (ctx.drawFocusRing) {
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
+ }
+ if (ctx.fillText) {
+ assert_throws_js(TypeError, function() { ctx.fillText(); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test'); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeText(); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.measureText(); });
+ }
+ assert_throws_js(TypeError, function() { ctx.drawImage(); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
+ // TODO: n >= 3 args on drawImage could be either a valid overload,
+ // or too few for another overload, or too many for another
+ // overload - what should happen?
+ if (ctx.createImageData) {
+ assert_throws_js(TypeError, function() { ctx.createImageData(); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(1); });
+ }
+ if (ctx.getImageData) {
+ assert_throws_js(TypeError, function() { ctx.getImageData(); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
+ }
+ if (ctx.putImageData) {
+ var imgdata = ctx.getImageData(0, 0, 1, 1);
+ assert_throws_js(TypeError, function() { ctx.putImageData(); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
+ }
+ var g = ctx.createLinearGradient(0, 0, 0, 0);
+ assert_throws_js(TypeError, function() { g.addColorStop(); });
+ assert_throws_js(TypeError, function() { g.addColorStop(0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html
index 7669c280491..d9e2de563bf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.3arg.html
@@ -13,26 +13,32 @@
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.drawImage(document.getElementById('green.png'), 0, 0);
-ctx.drawImage(document.getElementById('red.png'), -100, 0);
-ctx.drawImage(document.getElementById('red.png'), 100, 0);
-ctx.drawImage(document.getElementById('red.png'), 0, -50);
-ctx.drawImage(document.getElementById('red.png'), 0, 50);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0);
+ ctx.drawImage(bitmap_red, -100, 0);
+ ctx.drawImage(bitmap_red, 100, 0);
+ ctx.drawImage(bitmap_red, 0, -50);
+ ctx.drawImage(bitmap_red, 0, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
-<img src="/images/green.png" id="green.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html
index 3a2f2050946..befa7108f88 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.5arg.html
@@ -13,27 +13,33 @@
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.drawImage(document.getElementById('green.png'), 50, 0, 50, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 50, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 50, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
-<img src="/images/green.png" id="green.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
index 80cda234bb8..f71eebc2e06 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
@@ -16,26 +16,23 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/green.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/green.png" id="green.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
index d85ae780656..98da8eccbdf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
@@ -13,27 +13,32 @@
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.drawImage(document.getElementById('green.png'), 0, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -100, 0, 100, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 100, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -50, 100, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 50);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
-<img src="/images/green.png" id="green.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
index 703c6788948..f21096cd960 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
@@ -13,27 +13,34 @@
<p class="output">Actual output:</p>
<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
-<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.drawImage(document.getElementById('green.png'), 1, 1, 1, 1, 0, 0, 100, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -50, 0, 50, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 50, 50);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -25, 100, 25);
-ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 25);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
-<img src="/images/green.png" id="green.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
index b7487e09991..ca4cc189487 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
@@ -16,26 +16,22 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-});
+}, "");
</script>
-<img src="/images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
index 567b4abfcff..fb38943cfa7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
@@ -16,33 +16,29 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 51, 26);
- ctx.fillRect(49, 24, 51, 26);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 51, 26);
+ ctx.fillRect(49, 24, 51, 26);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
-});
+}, "");
</script>
-<img src="/images/rgrg-256x256.png" id="rgrg-256x256.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html
index 8926a72c9da..52acd11803f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.alpha.html
@@ -16,24 +16,21 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0;
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html
index b16473e3685..ffe19ce9bc4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.apng.html
@@ -19,12 +19,11 @@
var t = async_test("drawImage() of an APNG with no poster frame draws the first frame");
_addTest(function(canvas, ctx) {
-deferTest();
-step_timeout(t.step_func_done(function () {
- ctx.drawImage(document.getElementById('anim-gr.png'), 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-}), 500);
-
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.drawImage(document.getElementById('anim-gr.png'), 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ }), 500);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html
index 30cad0c7aea..6330d06ade3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.gif.html
@@ -19,12 +19,11 @@
var t = async_test("drawImage() of an animated GIF draws the first frame");
_addTest(function(canvas, ctx) {
-deferTest();
-step_timeout(t.step_func_done(function () {
- ctx.drawImage(document.getElementById('anim-gr.gif'), 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-}), 500);
-
+ deferTest();
+ step_timeout(t.step_func_done(function () {
+ ctx.drawImage(document.getElementById('anim-gr.gif'), 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ }), 500);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
index 779397f6b9b..2d28bc12837 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
@@ -16,21 +16,18 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("drawImage() of an APNG draws the poster frame");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-fetch('anim-poster-gr.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ const response = await fetch('/images/anim-poster-gr.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "drawImage() of an APNG draws the poster frame");
</script>
-<img src="/images/anim-poster-gr.png" id="anim-poster-gr.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html
index 7e9f1451963..f6516a8eccc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.broken.html
@@ -16,22 +16,16 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-fetch('/images/broken.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ const response = await fetch('/images/broken.png');
+ const blob = await response.blob();
+
+ await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.');
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html
index 3041d737913..d1f9aeb326f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.canvas.html
@@ -19,28 +19,27 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-var canvas2 = document.createElement('canvas');
-canvas2.width = 100;
-canvas2.height = 50;
-var ctx2 = canvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.drawImage(canvas2, 0, 0);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
-ctx.drawImage(document.createElement('canvas'), 0, 0);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = 100;
+ canvas2.height = 50;
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.drawImage(canvas2, 0, 0);
+
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+ ctx.drawImage(document.createElement('canvas'), 0, 0);
+
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html
index 380620faf34..70ec029d8e7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.clip.html
@@ -16,29 +16,26 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(-10, -10, 1, 1);
-ctx.clip();
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(-10, -10, 1, 1);
- ctx.clip();
- ctx.drawImage(document.getElementById('red.png'), 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html
index 7b7deb0f91e..4ff2026aad5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.composite.html
@@ -16,24 +16,21 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-over';
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-over';
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
index 02e4626133d..3e100c257fe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
@@ -16,20 +16,17 @@
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
index c684589de06..849f41aaf66 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.emptysrc.html
@@ -19,13 +19,12 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('red.png');
-img.src = "";
-ctx.drawImage(img, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var img = document.getElementById('red.png');
+ img.src = "";
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html
index 347e750eef9..d2e8108d90d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.immediate.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = new Image();
-img.src = '../images/red.png';
-// This triggers the "update the image data" algorithm.
-// The image will not go to the "completely available" state
-// until a fetch task in the networking task source is processed,
-// so the image must not be fully decodable yet:
-ctx.drawImage(img, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var img = new Image();
+ img.src = '../images/red.png';
+ // This triggers the "update the image data" algorithm.
+ // The image will not go to the "completely available" state
+ // until a fetch task in the networking task source is processed,
+ // so the image must not be fully decodable yet:
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html
index 677a7b856fa..dccf75c6d80 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.nosrc.html
@@ -19,12 +19,11 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = new Image();
-ctx.drawImage(img, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var img = new Image();
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html
index 5f90f819efe..b4a8440e460 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.reload.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('yellow.png');
-img.src = '../images/red.png';
-// This triggers the "update the image data" algorithm,
-// and resets the image to the "unavailable" state.
-// The image will not go to the "completely available" state
-// until a fetch task in the networking task source is processed,
-// so the image must not be fully decodable yet:
-ctx.drawImage(img, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var img = document.getElementById('yellow.png');
+ img.src = '../images/red.png';
+ // This triggers the "update the image data" algorithm,
+ // and resets the image to the "unavailable" state.
+ // The image will not go to the "completely available" state
+ // until a fetch task in the networking task source is processed,
+ // so the image must not be fully decodable yet:
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
index c887fd64533..91e11eb15ce 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.incomplete.removedsrc.html
@@ -19,13 +19,12 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var img = document.getElementById('red.png');
-img.removeAttribute('src');
-ctx.drawImage(img, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var img = document.getElementById('red.png');
+ img.removeAttribute('src');
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
index 1020754fa8f..94d4f71a7e9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
@@ -16,33 +16,29 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("Negative destination width/height represents the correct rectangle");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
- ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
+ ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative destination width/height represents the correct rectangle");
</script>
-<img src="/images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
index e02d0ff439d..281da9a5734 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
@@ -16,33 +16,29 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("Negative dimensions do not affect the direction of the image");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
- ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
+ ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative dimensions do not affect the direction of the image");
</script>
-<img src="/images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
index f15fc3adcb0..5a504973d11 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
@@ -16,33 +16,29 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("Negative source width/height represents the correct rectangle");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
- ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
+ ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative source width/height represents the correct rectangle");
</script>
-<img src="/images/ggrr-256x256.png" id="ggrr-256x256.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html
index a1d8badb069..0cebf6cf681 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonexistent.html
@@ -19,9 +19,8 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-var img = document.getElementById('not-found-at-all.png');
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(img, 0, 0); });
-
+ var img = document.getElementById('not-found-at-all.png');
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(img, 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
index f1ad616355d..8225d15fddc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
@@ -16,323 +16,320 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("drawImage() with Infinity/NaN is ignored");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, Infinity, 0);
-ctx.drawImage(bitmap, -Infinity, 0);
-ctx.drawImage(bitmap, NaN, 0);
-ctx.drawImage(bitmap, 0, Infinity);
-ctx.drawImage(bitmap, 0, -Infinity);
-ctx.drawImage(bitmap, 0, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, Infinity, 0);
+ ctx.drawImage(bitmap, -Infinity, 0);
+ ctx.drawImage(bitmap, NaN, 0);
+ ctx.drawImage(bitmap, 0, Infinity);
+ ctx.drawImage(bitmap, 0, -Infinity);
+ ctx.drawImage(bitmap, 0, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+
+}, "drawImage() with Infinity/NaN is ignored");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
index 3fde82454a8..8c32461b3ab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
@@ -16,25 +16,22 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("Stretched images do not get pixels wrapping around the edges");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, -1950, 0, 2000, 50);
- _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, -1950, 0, 2000, 50);
+ _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
+
+}, "Stretched images do not get pixels wrapping around the edges");
</script>
-<img src="/images/redtransparent.png" id="redtransparent.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html
index 73034f8ef0d..0f46c97dcea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.null.html
@@ -19,8 +19,7 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
-
+ assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html
index ebc7040fa4b..52852ec32e9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.path.html
@@ -16,23 +16,21 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- ctx.fill();
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html
index 7c5524b95fd..90eaaea5d96 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.1.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50);
-ctx.drawImage(canvas, 50, 0);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50);
+ ctx.drawImage(canvas, 50, 0);
+
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html
index dbc96dbb3c1..39e619ddc5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.self.2.html
@@ -19,19 +19,18 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 1, 100, 49);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 1);
-ctx.drawImage(canvas, 0, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 2);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 1, 100, 49);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 1);
+ ctx.drawImage(canvas, 0, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 2);
+
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html
index 5464e63e230..bcfcdadb28d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.svg.html
@@ -16,20 +16,22 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("drawImage() of an SVG image");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-fetch('/images/green.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ const img = new Image();
+ const imageLoadPromise = new Promise((resolve, reject) => {
+ img.onload = () => resolve();
+ img.onerror = (err) => reject(err);
+ });
+ img.src = '/images/green.svg';
+ await imageLoadPromise;
-});
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50, 25, 0, 255, 0, 255, 2);
+
+}, "drawImage() of an SVG image");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html
index 2c8f930262b..42a277e2008 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.transform.html
@@ -16,24 +16,21 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 0);
-fetch('red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(100, 0);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
index 90b3eac6974..73e8f45090c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
@@ -19,10 +19,9 @@
var t = async_test("Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
-
+ assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html
index 1acfa22d599..ef0be39ca74 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.wrongtype.paragraph.html
@@ -19,8 +19,7 @@
var t = async_test("Incorrect image types in drawImage do not match any defined overloads, so WebIDL throws a TypeError");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.drawImage(document.createElement('p'), 0, 0); });
-
+ assert_throws_js(TypeError, function() { ctx.drawImage(document.createElement('p'), 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
index 5906d61c3c1..d3c644cf88b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
@@ -19,19 +19,18 @@
var t = async_test("drawImage with zero-sized canvas as the source shoud throw exception");
_addTest(function(canvas, ctx) {
-var canvas2 = document.createElement('canvas');
-canvas2.width = 0;
-canvas2.height = 50;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
-
-canvas2.width = 50;
-canvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
-
-canvas2.width = 0;
-canvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
-
+ var canvas2 = document.createElement('canvas');
+ canvas2.width = 0;
+ canvas2.height = 50;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
+
+ canvas2.width = 50;
+ canvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
+
+ canvas2.width = 0;
+ canvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(canvas2, 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
index c3ce69d9e0b..2b7b4ebea6d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
@@ -16,26 +16,21 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("drawImage with zero-sized source rectangle draws nothing without exception");
-_addTest(function(canvas, ctx) {
+promise_test(async t => {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-const red = async () => await createImageBitmap(await (await fetch("/images/red.png")).blob());
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
- });
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-});
+}, "drawImage with zero-sized source rectangle draws nothing without exception");
</script>
-<img src="/images/red.png" id="red.png" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
index 403df3db463..ea00f1f9a14 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
@@ -16,27 +16,31 @@
<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
<ul id="d"></ul>
<script>
-var t = async_test("drawImage with zero-sized source rectangle from image draws nothing without exception");
-_addTest(function(canvas, ctx) {
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/red-zerowidth.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
-
-
-});
+promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ function loadImage(src) {
+ return new Promise((resolve, reject) => {
+ const img = new Image();
+ img.onload = () => resolve(img);
+ img.onerror = (err) => reject(err);
+ img.src = src;
+ });
+ }
+ const img1 = await loadImage('/images/red-zerowidth.svg');
+ const img2 = await loadImage('/images/red-zeroheight.svg');
+ const img3 = await loadImage('/images/red-zerosize.svg');
+
+ ctx.drawImage(img1, 0, 0, 100, 50);
+ ctx.drawImage(img2, 0, 0, 100, 50);
+ ctx.drawImage(img3, 0, 0, 100, 50);
+ _assertPixel(canvas, 50, 25, 0, 255, 0, 255);
+
+}, "drawImage with zero-sized source rectangle from image draws nothing without exception");
</script>
-<img src="/images/red-zerowidth.svg" id="red-zerowidth.svg" class="resource">
-<img src="/images/red-zeroheight.svg" id="red-zeroheight.svg" class="resource">
-<img src="/images/red-zerosize.svg" id="red-zerosize.svg" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
index 3821fff21c0..78a8c3ac064 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
@@ -19,11 +19,10 @@
var t = async_test("clearRect clears to transparent black");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
index da264239441..eb43a401e78 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
@@ -19,16 +19,15 @@
var t = async_test("clearRect is affected by clipping regions");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
index 3a228ae7ab3..73b87ecc81d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
@@ -19,12 +19,11 @@
var t = async_test("clearRect is not affected by globalAlpha");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.1;
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0.1;
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
index 2f49b808600..9eb3d338348 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
@@ -19,12 +19,11 @@
var t = async_test("clearRect is not affected by globalCompositeOperation");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
index 13ad1fb8120..baa48e2ba36 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
@@ -19,17 +19,16 @@
var t = async_test("clearRect of negative sizes works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 50, 25);
-ctx.clearRect(100, 0, -50, 25);
-ctx.clearRect(0, 50, 50, -25);
-ctx.clearRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,0,0,0);
-_assertPixel(canvas, 75,12, 0,0,0,0);
-_assertPixel(canvas, 25,37, 0,0,0,0);
-_assertPixel(canvas, 75,37, 0,0,0,0);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 50, 25);
+ ctx.clearRect(100, 0, -50, 25);
+ ctx.clearRect(0, 50, 50, -25);
+ ctx.clearRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,0,0,0);
+ _assertPixel(canvas, 75,12, 0,0,0,0);
+ _assertPixel(canvas, 25,37, 0,0,0,0);
+ _assertPixel(canvas, 75,37, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
index 56232594e10..726ed057727 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
@@ -19,33 +19,32 @@
var t = async_test("clearRect() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(Infinity, 0, 100, 50);
-ctx.clearRect(-Infinity, 0, 100, 50);
-ctx.clearRect(NaN, 0, 100, 50);
-ctx.clearRect(0, Infinity, 100, 50);
-ctx.clearRect(0, -Infinity, 100, 50);
-ctx.clearRect(0, NaN, 100, 50);
-ctx.clearRect(0, 0, Infinity, 50);
-ctx.clearRect(0, 0, -Infinity, 50);
-ctx.clearRect(0, 0, NaN, 50);
-ctx.clearRect(0, 0, 100, Infinity);
-ctx.clearRect(0, 0, 100, -Infinity);
-ctx.clearRect(0, 0, 100, NaN);
-ctx.clearRect(Infinity, Infinity, 100, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
-ctx.clearRect(Infinity, Infinity, 100, Infinity);
-ctx.clearRect(Infinity, 0, Infinity, 50);
-ctx.clearRect(Infinity, 0, Infinity, Infinity);
-ctx.clearRect(Infinity, 0, 100, Infinity);
-ctx.clearRect(0, Infinity, Infinity, 50);
-ctx.clearRect(0, Infinity, Infinity, Infinity);
-ctx.clearRect(0, Infinity, 100, Infinity);
-ctx.clearRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(Infinity, 0, 100, 50);
+ ctx.clearRect(-Infinity, 0, 100, 50);
+ ctx.clearRect(NaN, 0, 100, 50);
+ ctx.clearRect(0, Infinity, 100, 50);
+ ctx.clearRect(0, -Infinity, 100, 50);
+ ctx.clearRect(0, NaN, 100, 50);
+ ctx.clearRect(0, 0, Infinity, 50);
+ ctx.clearRect(0, 0, -Infinity, 50);
+ ctx.clearRect(0, 0, NaN, 50);
+ ctx.clearRect(0, 0, 100, Infinity);
+ ctx.clearRect(0, 0, 100, -Infinity);
+ ctx.clearRect(0, 0, 100, NaN);
+ ctx.clearRect(Infinity, Infinity, 100, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.clearRect(Infinity, Infinity, 100, Infinity);
+ ctx.clearRect(Infinity, 0, Infinity, 50);
+ ctx.clearRect(Infinity, 0, Infinity, Infinity);
+ ctx.clearRect(Infinity, 0, 100, Infinity);
+ ctx.clearRect(0, Infinity, Infinity, 50);
+ ctx.clearRect(0, Infinity, Infinity, Infinity);
+ ctx.clearRect(0, Infinity, 100, Infinity);
+ ctx.clearRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
index 8d837adc3a3..77c9c037b73 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
@@ -19,13 +19,12 @@
var t = async_test("clearRect does not affect the current path");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 16, 16);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 16, 16);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
index e65b46b23cd..8240073a281 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
@@ -19,15 +19,14 @@
var t = async_test("clearRect does not draw shadows");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.clearRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.clearRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
index 9e524c36f21..347bedb8355 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
@@ -19,13 +19,12 @@
var t = async_test("clearRect is affected by transforms");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.clearRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.clearRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
index ea1fff31cb8..2c192a7102b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
@@ -19,13 +19,12 @@
var t = async_test("clearRect of zero pixels has no effect");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 0);
-ctx.clearRect(0, 0, 0, 50);
-ctx.clearRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 0);
+ ctx.clearRect(0, 0, 0, 50);
+ ctx.clearRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
index 14c04829a75..f29daf426a2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
@@ -19,10 +19,9 @@
var t = async_test("fillRect works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
index bdd269e1ad0..cc46b765d4f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
@@ -19,17 +19,16 @@
var t = async_test("fillRect is affected by clipping regions");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
index 6f754581b22..7c64952e8bf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
@@ -19,18 +19,17 @@
var t = async_test("fillRect of negative sizes works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillRect(100, 0, -50, 25);
-ctx.fillRect(0, 50, 50, -25);
-ctx.fillRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillRect(100, 0, -50, 25);
+ ctx.fillRect(0, 50, 50, -25);
+ ctx.fillRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
index bf0ea501a07..090607766d9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
@@ -19,34 +19,33 @@
var t = async_test("fillRect() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(Infinity, 0, 100, 50);
-ctx.fillRect(-Infinity, 0, 100, 50);
-ctx.fillRect(NaN, 0, 100, 50);
-ctx.fillRect(0, Infinity, 100, 50);
-ctx.fillRect(0, -Infinity, 100, 50);
-ctx.fillRect(0, NaN, 100, 50);
-ctx.fillRect(0, 0, Infinity, 50);
-ctx.fillRect(0, 0, -Infinity, 50);
-ctx.fillRect(0, 0, NaN, 50);
-ctx.fillRect(0, 0, 100, Infinity);
-ctx.fillRect(0, 0, 100, -Infinity);
-ctx.fillRect(0, 0, 100, NaN);
-ctx.fillRect(Infinity, Infinity, 100, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
-ctx.fillRect(Infinity, Infinity, 100, Infinity);
-ctx.fillRect(Infinity, 0, Infinity, 50);
-ctx.fillRect(Infinity, 0, Infinity, Infinity);
-ctx.fillRect(Infinity, 0, 100, Infinity);
-ctx.fillRect(0, Infinity, Infinity, 50);
-ctx.fillRect(0, Infinity, Infinity, Infinity);
-ctx.fillRect(0, Infinity, 100, Infinity);
-ctx.fillRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(Infinity, 0, 100, 50);
+ ctx.fillRect(-Infinity, 0, 100, 50);
+ ctx.fillRect(NaN, 0, 100, 50);
+ ctx.fillRect(0, Infinity, 100, 50);
+ ctx.fillRect(0, -Infinity, 100, 50);
+ ctx.fillRect(0, NaN, 100, 50);
+ ctx.fillRect(0, 0, Infinity, 50);
+ ctx.fillRect(0, 0, -Infinity, 50);
+ ctx.fillRect(0, 0, NaN, 50);
+ ctx.fillRect(0, 0, 100, Infinity);
+ ctx.fillRect(0, 0, 100, -Infinity);
+ ctx.fillRect(0, 0, 100, NaN);
+ ctx.fillRect(Infinity, Infinity, 100, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.fillRect(Infinity, Infinity, 100, Infinity);
+ ctx.fillRect(Infinity, 0, Infinity, 50);
+ ctx.fillRect(Infinity, 0, Infinity, Infinity);
+ ctx.fillRect(Infinity, 0, 100, Infinity);
+ ctx.fillRect(0, Infinity, Infinity, 50);
+ ctx.fillRect(0, Infinity, Infinity, Infinity);
+ ctx.fillRect(0, Infinity, 100, Infinity);
+ ctx.fillRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
index 3d073c41f60..39a6e181033 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
@@ -19,14 +19,13 @@
var t = async_test("fillRect does not affect the current path");
_addTest(function(canvas, ctx) {
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
index 78f3f4d3677..48aa8538f1d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
@@ -19,15 +19,14 @@
var t = async_test("fillRect draws shadows");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.fillRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.fillRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
index 6892747651e..de6f790bc77 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
@@ -19,12 +19,11 @@
var t = async_test("fillRect is affected by transforms");
_addTest(function(canvas, ctx) {
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
index 915347713fa..095eb19a667 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
@@ -19,14 +19,13 @@
var t = async_test("fillRect of zero pixels has no effect");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 0);
-ctx.fillRect(0, 0, 0, 50);
-ctx.fillRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 0);
+ ctx.fillRect(0, 0, 0, 50);
+ ctx.fillRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
index 299bb8a39ee..d2ea8131789 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
@@ -19,11 +19,10 @@
var t = async_test("strokeRect works");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
index 5f35cd07be3..31db69b6cdc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
@@ -19,18 +19,17 @@
var t = async_test("strokeRect is affected by clipping regions");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
index 3e80a77f744..323b663145e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
@@ -19,12 +19,11 @@
var t = async_test("strokeRect is affected by globalAlpha");
_addTest(function(canvas, ctx) {
-ctx.globalAlpha = 0;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.globalAlpha = 0;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
index ce52dffd8c2..671db7f07a8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
@@ -19,12 +19,11 @@
var t = async_test("strokeRect is not affected by globalCompositeOperation");
_addTest(function(canvas, ctx) {
-ctx.globalCompositeOperation = 'source-in';
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
index 617d56f125c..20bbc5bafea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
@@ -19,19 +19,18 @@
var t = async_test("strokeRect of negative sizes works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 25;
-ctx.strokeRect(12, 12, 26, 1);
-ctx.strokeRect(88, 12, -26, 1);
-ctx.strokeRect(12, 38, 26, -1);
-ctx.strokeRect(88, 38, -26, -1);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 25;
+ ctx.strokeRect(12, 12, 26, 1);
+ ctx.strokeRect(88, 12, -26, 1);
+ ctx.strokeRect(12, 38, 26, -1);
+ ctx.strokeRect(88, 38, -26, -1);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
index 3f98e5e2feb..af7a393c8fc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
@@ -19,35 +19,34 @@
var t = async_test("strokeRect() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 150;
-ctx.strokeRect(Infinity, 0, 100, 50);
-ctx.strokeRect(-Infinity, 0, 100, 50);
-ctx.strokeRect(NaN, 0, 100, 50);
-ctx.strokeRect(0, Infinity, 100, 50);
-ctx.strokeRect(0, -Infinity, 100, 50);
-ctx.strokeRect(0, NaN, 100, 50);
-ctx.strokeRect(0, 0, Infinity, 50);
-ctx.strokeRect(0, 0, -Infinity, 50);
-ctx.strokeRect(0, 0, NaN, 50);
-ctx.strokeRect(0, 0, 100, Infinity);
-ctx.strokeRect(0, 0, 100, -Infinity);
-ctx.strokeRect(0, 0, 100, NaN);
-ctx.strokeRect(Infinity, Infinity, 100, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
-ctx.strokeRect(Infinity, Infinity, 100, Infinity);
-ctx.strokeRect(Infinity, 0, Infinity, 50);
-ctx.strokeRect(Infinity, 0, Infinity, Infinity);
-ctx.strokeRect(Infinity, 0, 100, Infinity);
-ctx.strokeRect(0, Infinity, Infinity, 50);
-ctx.strokeRect(0, Infinity, Infinity, Infinity);
-ctx.strokeRect(0, Infinity, 100, Infinity);
-ctx.strokeRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 150;
+ ctx.strokeRect(Infinity, 0, 100, 50);
+ ctx.strokeRect(-Infinity, 0, 100, 50);
+ ctx.strokeRect(NaN, 0, 100, 50);
+ ctx.strokeRect(0, Infinity, 100, 50);
+ ctx.strokeRect(0, -Infinity, 100, 50);
+ ctx.strokeRect(0, NaN, 100, 50);
+ ctx.strokeRect(0, 0, Infinity, 50);
+ ctx.strokeRect(0, 0, -Infinity, 50);
+ ctx.strokeRect(0, 0, NaN, 50);
+ ctx.strokeRect(0, 0, 100, Infinity);
+ ctx.strokeRect(0, 0, 100, -Infinity);
+ ctx.strokeRect(0, 0, 100, NaN);
+ ctx.strokeRect(Infinity, Infinity, 100, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.strokeRect(Infinity, Infinity, 100, Infinity);
+ ctx.strokeRect(Infinity, 0, Infinity, 50);
+ ctx.strokeRect(Infinity, 0, Infinity, Infinity);
+ ctx.strokeRect(Infinity, 0, 100, Infinity);
+ ctx.strokeRect(0, Infinity, Infinity, 50);
+ ctx.strokeRect(0, Infinity, Infinity, Infinity);
+ ctx.strokeRect(0, Infinity, 100, Infinity);
+ ctx.strokeRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
index 5d88373525a..121789d8642 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
@@ -19,15 +19,14 @@
var t = async_test("strokeRect does not affect the current path");
_addTest(function(canvas, ctx) {
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 5;
-ctx.strokeRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
index a8c7ba314a3..8e7a50a7458 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
@@ -19,18 +19,17 @@
var t = async_test("strokeRect draws shadows");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, -75, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, -75, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
index 9fe89042abf..312b9d20038 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
@@ -19,13 +19,12 @@
var t = async_test("fillRect is affected by transforms");
_addTest(function(canvas, ctx) {
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 5;
-ctx.strokeRect(2.5, -2.6, 5, 0.2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(2.5, -2.6, 5, 0.2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
index 188699d6a8d..c140a2668b0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
@@ -19,11 +19,10 @@
var t = async_test("strokeRect of 0x0 pixels draws nothing");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
index 2e28b90dd2a..f17620a3024 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
@@ -19,13 +19,12 @@
var t = async_test("strokeRect of 0x0 pixels draws nothing, including caps and joins");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
index 5831c228fff..e671ae4116b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
@@ -19,11 +19,10 @@
var t = async_test("strokeRect of Nx0 pixels draws a straight line");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
index 6a09e8eaf95..ff3c4040b3f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
@@ -19,12 +19,11 @@
var t = async_test("strokeRect of Nx0 pixels draws a closed line with no caps");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
index c6cc50ca9b5..809781ab438 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
@@ -19,12 +19,11 @@
var t = async_test("strokeRect of Nx0 pixels draws a closed line with joins");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 250;
-ctx.lineJoin = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 250;
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html
index 02408138c24..ae6507350cd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.html
@@ -19,25 +19,24 @@
var t = async_test("ctx.fillStyle works with color objects");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = {r: 1, g: 0, b: 0};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 255,0,0,255);
-ctx.fillStyle = {r: 0, g: 0, b: 1};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,255,255);
-ctx.fillStyle = {r: 0.2, g: 0.4, b: 0.6};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 51,102,153,255);
-ctx.fillStyle = {r: 0, g: 1, b: 0};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-ctx.fillStyle = {r: -1, g: 0, b: 0};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,255);
-ctx.fillStyle = {r: 0, g: 2, b: 0};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = {r: 1, g: 0, b: 0};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 255,0,0,255);
+ ctx.fillStyle = {r: 0, g: 0, b: 1};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,255,255);
+ ctx.fillStyle = {r: 0.2, g: 0.4, b: 0.6};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 51,102,153,255);
+ ctx.fillStyle = {r: 0, g: 1, b: 0};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = {r: -1, g: 0, b: 0};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,255);
+ ctx.fillStyle = {r: 0, g: 2, b: 0};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html
index 09a8eacdeca..b48715f093d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.fillStyle.colorObject.transparency.html
@@ -19,22 +19,21 @@
var t = async_test("ctx.fillStyle with color objects has transparency");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = {r: 0, g: 1, b: 0, a: -1};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0.5};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,128);
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = {r: 0, g: 1, b: 0, a: 1};
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = {r: 0, g: 1, b: 0, a: -1};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = {r: 0, g: 1, b: 0, a: 0.5};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,128);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = {r: 0, g: 1, b: 0, a: 1};
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html
index a56a020abda..308e6b54b78 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.html
@@ -19,26 +19,25 @@
var t = async_test("ctx.strokeStyle works with color objects");
_addTest(function(canvas, ctx) {
-ctx.lineWidth = 50;
-ctx.strokeStyle = {r: 1, g: 0, b: 0};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 255,0,0,255);
-ctx.strokeStyle = {r: 0, g: 0, b: 1};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,255,255);
-ctx.strokeStyle = {r: 0.2, g: 0.4, b: 0.6};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 51,102,153,255);
-ctx.strokeStyle = {r: 0, g: 1, b: 0};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-ctx.strokeStyle = {r: -1, g: 0, b: 0};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,255);
-ctx.strokeStyle = {r: 0, g: 2, b: 0};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = {r: 1, g: 0, b: 0};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 255,0,0,255);
+ ctx.strokeStyle = {r: 0, g: 0, b: 1};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,255,255);
+ ctx.strokeStyle = {r: 0.2, g: 0.4, b: 0.6};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 51,102,153,255);
+ ctx.strokeStyle = {r: 0, g: 1, b: 0};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.strokeStyle = {r: -1, g: 0, b: 0};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,255);
+ ctx.strokeStyle = {r: 0, g: 2, b: 0};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html
index 1b19cab317a..0232140eafd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/fill-and-stroke-styles/2d.strokeStyle.colorObject.transparency.html
@@ -19,22 +19,21 @@
var t = async_test("ctx.strokeStyle with color objects has transparency");
_addTest(function(canvas, ctx) {
-ctx.lineWidth = 50;
-ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-ctx.strokeStyle = {r: 0, g: 1, b: 0, a: -1};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-ctx.clearRect(0, 0, 100, 50);
-ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0.5};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,128);
-ctx.clearRect(0, 0, 100, 50);
-ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 1};
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ ctx.strokeStyle = {r: 0, g: 1, b: 0, a: -1};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 0.5};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,128);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.strokeStyle = {r: 0, g: 1, b: 0, a: 1};
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
index 77818444c87..2abd7cdee75 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
@@ -19,13 +19,12 @@
var t = async_test("Test exceptions on CanvasFilter() blur.object");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
-
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
index a56840e6073..61c0f37591e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
@@ -19,50 +19,49 @@
var t = async_test("Test the functionality of ColorMatrix filters in CanvasFilter objects");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
-ctx.fillStyle = '#f00';
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
-ctx.clearRect(0, 0, 100, 50);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
- 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0
-]});
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, 0, 50, 25);
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 25, 50, 25);
-ctx.fillStyle = '#fff';
-ctx.fillRect(50, 25, 50, 25);
-_assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
-
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
+ ctx.fillStyle = '#f00';
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
+ 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0
+ ]});
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, 0, 50, 25);
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 25, 50, 25);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(50, 25, 50, 25);
+ _assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
index c54299ff2a5..0512cac1c98 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
@@ -19,48 +19,47 @@
var t = async_test("Test pixels on CanvasFilter() componentTransfer with discrete type");
_addTest(function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k];
-}
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k];
+ }
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'discrete', tableValues: tableValuesR},
- funcG: {type: 'discrete', tableValues: tableValuesG},
- funcB: {type: 'discrete', tableValues: tableValuesB},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'discrete', tableValues: tableValuesR},
+ funcG: {type: 'discrete', tableValues: tableValuesG},
+ funcB: {type: 'discrete', tableValues: tableValuesB},
+ });
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
index 110cd2396ea..c6feb50a35d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
@@ -19,39 +19,38 @@
var t = async_test("Test pixels on CanvasFilter() componentTransfer with gamma type");
_addTest(function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, amplitude, exponent, offset) {
- return [
- Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
- ];
-}
-
-const amplitudes = [2, 1.1, 0.5];
-const exponents = [5, 3, 1];
-const offsets = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
- funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
- funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, amplitudes, exponents, offsets);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, amplitude, exponent, offset) {
+ return [
+ Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
+ ];
+ }
+
+ const amplitudes = [2, 1.1, 0.5];
+ const exponents = [5, 3, 1];
+ const offsets = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
+ funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
+ funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, amplitudes, exponents, offsets);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
index 96a3e4936ee..bb7dc41c3d8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
@@ -19,26 +19,25 @@
var t = async_test("Test pixels on CanvasFilter() componentTransfer with identity type");
_addTest(function(canvas, ctx) {
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'identity'},
- funcG: {type: 'identity'},
- funcB: {type: 'identity'},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
- ctx.fillRect(0, 0, 10, 10);
- _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
-}
-
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'identity'},
+ funcG: {type: 'identity'},
+ funcB: {type: 'identity'},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
index 10f9931cc64..ee4a0539617 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
@@ -19,38 +19,37 @@
var t = async_test("Test pixels on CanvasFilter() componentTransfer with linear type");
_addTest(function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, slopes, intercepts) {
- return [
- Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
- Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
- Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
- ];
-}
-
-const slopes = [0.5, 1.2, -0.2];
-const intercepts = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
- funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
- funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, slopes, intercepts);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, slopes, intercepts) {
+ return [
+ Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
+ Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
+ Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
+ ];
+ }
+
+ const slopes = [0.5, 1.2, -0.2];
+ const intercepts = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
+ funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
+ funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, slopes, intercepts);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
index 7e743bf34f0..510d1304246 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
@@ -19,48 +19,47 @@
var t = async_test("Test pixels on CanvasFilter() componentTransfer with table type");
_addTest(function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length - 1;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
-}
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length - 1;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
+ }
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'table', tableValues: tableValuesR},
- funcG: {type: 'table', tableValues: tableValuesG},
- funcB: {type: 'table', tableValues: tableValuesB},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'table', tableValues: tableValuesR},
+ funcG: {type: 'table', tableValues: tableValuesG},
+ funcB: {type: 'table', tableValues: tableValuesB},
+ });
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
index b994a91842c..4f4a9c17bd1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
@@ -19,24 +19,23 @@
var t = async_test("Test exceptions on CanvasFilter() convolveMatrix");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
-// This should not throw an error
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
-
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
+ // This should not throw an error
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
index 71a8c9eb484..2a14e30bb75 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
@@ -19,105 +19,104 @@
var t = async_test("Test exceptions on CanvasFilter() dropShadow object");
_addTest(function(canvas, ctx) {
-// dx
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
-// dy
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
-// floodOpacity
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
-// stdDeviation
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
-// floodColor
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
-
-// dx
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
-// dy
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
-// floodOpacity
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
-// stdDeviation
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
-// floodColor
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
+ // dx
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
+ // dy
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
+ // floodOpacity
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
+ // stdDeviation
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
+ // floodColor
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
+ // dx
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
+ // dy
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
+ // floodOpacity
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
+ // stdDeviation
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
+ // floodColor
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html
index a4625db0197..059a71025d5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.tentative.html
@@ -19,28 +19,27 @@
var t = async_test("Test CanvasFilter() object");
_addTest(function(canvas, ctx) {
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = new CanvasFilter([
- {filter: 'gaussianBlur', stdDeviation: 5},
- {filter: 'gaussianBlur', stdDeviation: 10}
-]);
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-var canvas2 = document.createElement('canvas');
-var ctx2 = canvas2.getContext('2d');
-ctx2.filter = ctx.filter;
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-ctx.filter = 'this string is not a filter and should do nothing';
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = new CanvasFilter([
+ {filter: 'gaussianBlur', stdDeviation: 5},
+ {filter: 'gaussianBlur', stdDeviation: 10}
+ ]);
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ var canvas2 = document.createElement('canvas');
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.filter = ctx.filter;
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ ctx.filter = 'this string is not a filter and should do nothing';
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
index 64f909a7fdb..7ab62e368d0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
@@ -19,111 +19,110 @@
var t = async_test("Test exceptions on CanvasFilter() turbulence object");
_addTest(function(canvas, ctx) {
-const errorTestCases = [
- {baseFrequency: {}},
- {baseFrequency: -1},
- {baseFrequency: [0, -1]},
- {baseFrequency: NaN},
- {baseFrequency: Infinity},
- {baseFrequency: undefined},
- {baseFrequency: -Infinity},
- {baseFrequency: 'test'},
-
- {numOctaves: {}},
- {numOctaves: -1},
- {numOctaves: NaN},
- {numOctaves: Infinity},
- {numOctaves: undefined},
- {numOctaves: -Infinity},
- {numOctaves: [1, 1]},
- {numOctaves: 'test'},
-
- {seed: {}},
- {seed: NaN},
- {seed: Infinity},
- {seed: undefined},
- {seed: -Infinity},
- {seed: [1, 1]},
- {seed: 'test'},
-
- {stitchTiles: {}},
- {stitchTiles: NaN},
- {stitchTiles: Infinity},
- {stitchTiles: undefined},
- {stitchTiles: -Infinity},
- {stitchTiles: [1, 1]},
- {stitchTiles: 'test'},
- {stitchTiles: null},
- {stitchTiles: []},
- {stitchTiles: [10]},
- {stitchTiles: 30},
- {stitchTiles: false},
- {stitchTiles: true},
- {stitchTiles: '10'},
- {stitchTiles: -1},
-
- {type: {}},
- {type: NaN},
- {type: Infinity},
- {type: undefined},
- {type: -Infinity},
- {type: [1, 1]},
- {type: 'test'},
- {type: null},
- {type: []},
- {type: [10]},
- {type: 30},
- {type: false},
- {type: true},
- {type: '10'},
- {type: -1},
-]
-
-// null and [] = 0 when parsed as number
-const workingTestCases = [
- {baseFrequency: null},
- {baseFrequency: []},
- {baseFrequency: [10]},
- {baseFrequency: [10, 3]},
- {baseFrequency: 30},
- {baseFrequency: false},
- {baseFrequency: true},
- {baseFrequency: '10'},
-
- {numOctaves: null},
- {numOctaves: []},
- {numOctaves: [10]},
- {numOctaves: 30},
- {numOctaves: false},
- {numOctaves: true},
- {numOctaves: '10'},
-
- {seed: null},
- {seed: []},
- {seed: [10]},
- {seed: 30},
- {seed: false},
- {seed: true},
- {seed: '10'},
- {seed: -1},
-
- {stitchTiles: 'stitch'},
- {stitchTiles: 'noStitch'},
-
- {type: 'fractalNoise'},
- {type: 'turbulence'},
-]
-
-for (testCase of errorTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
-}
-
-for (testCase of workingTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
-}
-
+ const errorTestCases = [
+ {baseFrequency: {}},
+ {baseFrequency: -1},
+ {baseFrequency: [0, -1]},
+ {baseFrequency: NaN},
+ {baseFrequency: Infinity},
+ {baseFrequency: undefined},
+ {baseFrequency: -Infinity},
+ {baseFrequency: 'test'},
+
+ {numOctaves: {}},
+ {numOctaves: -1},
+ {numOctaves: NaN},
+ {numOctaves: Infinity},
+ {numOctaves: undefined},
+ {numOctaves: -Infinity},
+ {numOctaves: [1, 1]},
+ {numOctaves: 'test'},
+
+ {seed: {}},
+ {seed: NaN},
+ {seed: Infinity},
+ {seed: undefined},
+ {seed: -Infinity},
+ {seed: [1, 1]},
+ {seed: 'test'},
+
+ {stitchTiles: {}},
+ {stitchTiles: NaN},
+ {stitchTiles: Infinity},
+ {stitchTiles: undefined},
+ {stitchTiles: -Infinity},
+ {stitchTiles: [1, 1]},
+ {stitchTiles: 'test'},
+ {stitchTiles: null},
+ {stitchTiles: []},
+ {stitchTiles: [10]},
+ {stitchTiles: 30},
+ {stitchTiles: false},
+ {stitchTiles: true},
+ {stitchTiles: '10'},
+ {stitchTiles: -1},
+
+ {type: {}},
+ {type: NaN},
+ {type: Infinity},
+ {type: undefined},
+ {type: -Infinity},
+ {type: [1, 1]},
+ {type: 'test'},
+ {type: null},
+ {type: []},
+ {type: [10]},
+ {type: 30},
+ {type: false},
+ {type: true},
+ {type: '10'},
+ {type: -1},
+ ]
+
+ // null and [] = 0 when parsed as number
+ const workingTestCases = [
+ {baseFrequency: null},
+ {baseFrequency: []},
+ {baseFrequency: [10]},
+ {baseFrequency: [10, 3]},
+ {baseFrequency: 30},
+ {baseFrequency: false},
+ {baseFrequency: true},
+ {baseFrequency: '10'},
+
+ {numOctaves: null},
+ {numOctaves: []},
+ {numOctaves: [10]},
+ {numOctaves: 30},
+ {numOctaves: false},
+ {numOctaves: true},
+ {numOctaves: '10'},
+
+ {seed: null},
+ {seed: []},
+ {seed: [10]},
+ {seed: 30},
+ {seed: false},
+ {seed: true},
+ {seed: '10'},
+ {seed: -1},
+
+ {stitchTiles: 'stitch'},
+ {stitchTiles: 'noStitch'},
+
+ {type: 'fractalNoise'},
+ {type: 'turbulence'},
+ ]
+
+ for (testCase of errorTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
+ }
+
+ for (testCase of workingTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.value.html b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.value.html
index b5803655f5c..5716b9bd167 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.value.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/filters/2d.filter.value.html
@@ -19,37 +19,36 @@
var t = async_test("test if ctx.filter works correctly");
_addTest(function(canvas, ctx) {
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.save();
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.restore();
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur(10)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'blur 10px';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'inherit';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'initial';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'unset';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = '';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = null;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = undefined;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur( 5px)';
-assert_equals(ctx.filter, 'blur( 5px)');
-
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.save();
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.restore();
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur(10)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'blur 10px';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'inherit';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'initial';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'unset';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = '';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = null;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = undefined;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur( 5px)';
+ assert_equals(ctx.filter, 'blur( 5px)');
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html
index 72d97c663f8..0666e3098a7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha-expected.html
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html
index b4512e2455e..8a450275889 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter</title>
-<h1>2d.layer.global-states.alpha.filter</h1>
+<title>Canvas test: 2d.layer.global-states.alpha.blending</title>
+<h1>2d.layer.global-states.alpha.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -17,11 +17,12 @@
ctx.fill(circle);
ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalCompositeOperation = 'multiply';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html
index 1f23dba96cc..8e15a2b9364 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending</title>
+<h1>2d.layer.global-states.alpha.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -17,11 +17,15 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html
new file mode 100644
index 00000000000..d7ba158d161
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow-expected.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ canvas2 = document.createElement("canvas");
+ ctx2 = canvas2.getContext("2d");
+
+ ctx2.globalCompositeOperation = 'screen';
+ ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx2.fillRect(50, 50, 75, 50);
+ ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx2.fillRect(70, 70, 75, 50);
+
+ ctx.drawImage(canvas2, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html
new file mode 100644
index 00000000000..22946174cde
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.blending.shadow.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html
index 12fc31209ac..951049e638c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.filter.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.alpha.composite</title>
+<h1>2d.layer.global-states.alpha.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,12 +16,13 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
+ ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html
index 54bafb9e652..1ac6a2cbfe8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.alpha.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite</title>
+<h1>2d.layer.global-states.alpha.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -19,10 +19,13 @@
ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html
index ab7e6cc6c19..a669a2271e9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.alpha.filter.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.alpha.composite.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -18,11 +18,14 @@
ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html
new file mode 100644
index 00000000000..c07e717a663
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.composite.shadow.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.html
index 10ef0e7b221..829796acbf9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.html
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html
index 9daefc377bd..206eb750139 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow-expected.html
@@ -19,11 +19,12 @@
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html
index a0f4d79a223..bcb7fe50962 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.shadow.html
@@ -20,10 +20,14 @@
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html
index cff8783b392..33fdf46a287 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.filter</title>
-<h1>2d.layer.global-states.filter</h1>
+<title>Canvas test: 2d.layer.global-states.blending</title>
+<h1>2d.layer.global-states.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,11 +16,12 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.filter = 'sepia(1) opacity(30%)';
+ ctx.globalCompositeOperation = 'multiply';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.html
index bf522c29457..7d4d9ae4b5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter</title>
-<h1>2d.layer.global-states.alpha.filter</h1>
+<link rel="match" href="2d.layer.global-states.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending</title>
+<h1>2d.layer.global-states.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -17,11 +17,14 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html
index 857db7ba991..02275c8cc21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter.shadow</title>
-<h1>2d.layer.global-states.alpha.filter.shadow</h1>
+<title>Canvas test: 2d.layer.global-states.blending.shadow</title>
+<h1>2d.layer.global-states.blending.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,15 +16,15 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html
index 3b4727bfc34..80f414d4ee5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.blending.shadow.html
@@ -1,9 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-2; totalPixels=0-5824">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.shadow</title>
-<h1>2d.layer.global-states.alpha.filter.shadow</h1>
+<link rel="match" href="2d.layer.global-states.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending.shadow</title>
+<h1>2d.layer.global-states.blending.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -18,14 +17,17 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html
index 7e2e021b552..ed7669c4cfa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.globalcompositeoperation</title>
-<h1>2d.layer.global-states.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.composite</title>
+<h1>2d.layer.global-states.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.html
index f27336adf4b..898d1499241 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.globalcompositeoperation</title>
-<h1>2d.layer.global-states.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite</title>
+<h1>2d.layer.global-states.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html
index ab7e6cc6c19..e380cccab82 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.alpha.filter.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.composite.shadow</title>
+<h1>2d.layer.global-states.composite.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,13 +16,15 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html
new file mode 100644
index 00000000000..9e32dddd40d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.composite.shadow.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite.shadow</title>
+<h1>2d.layer.global-states.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html
new file mode 100644
index 00000000000..f304700feb3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha</title>
+<h1>2d.layer.global-states.filter.alpha</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html
new file mode 100644
index 00000000000..7c91ce42293
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending-expected.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending</title>
+<h1>2d.layer.global-states.filter.alpha.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html
new file mode 100644
index 00000000000..6f92e6d33f0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending</title>
+<h1>2d.layer.global-states.filter.alpha.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html
new file mode 100644
index 00000000000..d9c93719b99
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html
new file mode 100644
index 00000000000..68bdee684d3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.blending.shadow.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html
new file mode 100644
index 00000000000..8e0d98648ea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite-expected.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite</title>
+<h1>2d.layer.global-states.filter.alpha.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html
new file mode 100644
index 00000000000..72282d65598
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.html
@@ -0,0 +1,38 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite</title>
+<h1>2d.layer.global-states.filter.alpha.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html
new file mode 100644
index 00000000000..26d13a4cae9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html
new file mode 100644
index 00000000000..71c99dba353
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.composite.shadow.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html
new file mode 100644
index 00000000000..9e687bcaf8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha</title>
+<h1>2d.layer.global-states.filter.alpha</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html
new file mode 100644
index 00000000000..9cc735fd42c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.5;
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html
new file mode 100644
index 00000000000..a9564c44a7c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.alpha.shadow.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.5;
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html
new file mode 100644
index 00000000000..f81dcf72dc2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.blending</title>
+<h1>2d.layer.global-states.filter.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html
new file mode 100644
index 00000000000..a812563398e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending</title>
+<h1>2d.layer.global-states.filter.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html
new file mode 100644
index 00000000000..a48485f7e8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.blending.shadow</title>
+<h1>2d.layer.global-states.filter.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html
new file mode 100644
index 00000000000..bf30126ff2f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.blending.shadow.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending.shadow</title>
+<h1>2d.layer.global-states.filter.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html
new file mode 100644
index 00000000000..97e85a1593b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.composite</title>
+<h1>2d.layer.global-states.filter.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html
new file mode 100644
index 00000000000..a2636d85255
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite</title>
+<h1>2d.layer.global-states.filter.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html
new file mode 100644
index 00000000000..79191ee3910
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.composite.shadow</title>
+<h1>2d.layer.global-states.filter.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html
new file mode 100644
index 00000000000..85b83b59b90
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.composite.shadow.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite.shadow</title>
+<h1>2d.layer.global-states.filter.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.html
deleted file mode 100644
index 7524ef56bb9..00000000000
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter</title>
-<h1>2d.layer.global-states.filter</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
-<canvas id="canvas" width="200" height="200">
- <p class="fallback">FAIL (fallback content)</p>
-</canvas>
-<script>
- const canvas = document.getElementById("canvas");
- const ctx = canvas.getContext('2d');
-
- ctx.fillStyle = 'rgba(0, 0, 255, 1)';
-
- var circle = new Path2D();
- circle.arc(90, 90, 45, 0, 2 * Math.PI);
- ctx.fill(circle);
-
- ctx.filter = 'sepia(1) opacity(30%)';
-
- ctx.beginLayer();
-
- ctx.fillStyle = 'rgba(225, 0, 0, 1)';
- ctx.fillRect(50, 50, 75, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 1)';
- ctx.fillRect(70, 70, 75, 50);
-
- ctx.endLayer();
-</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html
new file mode 100644
index 00000000000..e56fe0b3602
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.no-global-states</title>
+<h1>2d.layer.global-states.filter.no-global-states</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ // No global states.
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html
new file mode 100644
index 00000000000..af495b21cd2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.no-global-states.html
@@ -0,0 +1,37 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.no-global-states</title>
+<h1>2d.layer.global-states.filter.no-global-states</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ // No global states.
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html
index 6ec9b02f7cb..59cf16fa87d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow-expected.html
@@ -2,7 +2,7 @@
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.layer.global-states.filter.shadow</title>
<h1>2d.layer.global-states.filter.shadow</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
@@ -10,24 +10,43 @@
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext('2d');
- ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
- var circle = new Path2D();
- circle.arc(90, 90, 45, 0, 2 * Math.PI);
- ctx.fill(circle);
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
- ctx.filter = 'sepia(1) opacity(70%)';
- ctx.shadowOffsetX = -10;
- ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
-
- canvas2 = document.createElement("canvas");
- ctx2 = canvas2.getContext("2d");
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
- ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
- ctx2.fillRect(50, 50, 75, 50);
- ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
- ctx2.fillRect(70, 70, 75, 50);
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
- ctx.drawImage(canvas2, 0, 0);
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html
index efa5dca2ae0..2c692d6db76 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.filter.shadow.html
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<link rel="match" href="2d.layer.global-states.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-1; totalPixels=0-49">
<title>Canvas test: 2d.layer.global-states.filter.shadow</title>
<h1>2d.layer.global-states.filter.shadow</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
@@ -18,16 +17,22 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.filter = 'sepia(1) opacity(70%)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
- ctx.beginLayer();
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
- ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
ctx.fillRect(70, 70, 75, 50);
ctx.endLayer();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html
index 139ff8ac944..b91a2ae8b52 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.no_global_states</title>
-<h1>2d.layer.global-states.no_global_states</h1>
+<title>Canvas test: 2d.layer.global-states.no-global-states</title>
+<h1>2d.layer.global-states.no-global-states</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html
index 93d2bdeb927..d561be23410 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no-global-states.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.no_global_states-expected.html">
-<title>Canvas test: 2d.layer.global-states.no_global_states</title>
-<h1>2d.layer.global-states.no_global_states</h1>
+<link rel="match" href="2d.layer.global-states.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.no-global-states</title>
+<h1>2d.layer.global-states.no-global-states</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html
index 6787bdd1e50..ba56644d6c2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow-expected.html
@@ -18,11 +18,12 @@
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow.html
index da78b3435c7..bd9e868d1ef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.shadow.html
@@ -19,10 +19,14 @@
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex-expected.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex-expected.html
index 1944ea6d2ac..84ad6244740 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex-expected.html
@@ -14,7 +14,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex.html b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex.html
index f99357bd7fd..6ae78f690ae 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.several-complex.html
@@ -16,7 +16,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.butt.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.butt.html
index 59b1f76c686..f8c7cab1f2e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.butt.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.butt.html
@@ -19,42 +19,41 @@
var t = async_test("lineCap 'butt' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'butt';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 25,14, 0,255,0,255);
-_assertPixel(canvas, 25,15, 0,255,0,255);
-_assertPixel(canvas, 25,16, 0,255,0,255);
-_assertPixel(canvas, 25,34, 0,255,0,255);
-_assertPixel(canvas, 25,35, 0,255,0,255);
-_assertPixel(canvas, 25,36, 0,255,0,255);
-
-_assertPixel(canvas, 75,14, 0,255,0,255);
-_assertPixel(canvas, 75,15, 0,255,0,255);
-_assertPixel(canvas, 75,16, 0,255,0,255);
-_assertPixel(canvas, 75,34, 0,255,0,255);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-_assertPixel(canvas, 75,36, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'butt';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 25,14, 0,255,0,255);
+ _assertPixel(canvas, 25,15, 0,255,0,255);
+ _assertPixel(canvas, 25,16, 0,255,0,255);
+ _assertPixel(canvas, 25,34, 0,255,0,255);
+ _assertPixel(canvas, 25,35, 0,255,0,255);
+ _assertPixel(canvas, 25,36, 0,255,0,255);
+
+ _assertPixel(canvas, 75,14, 0,255,0,255);
+ _assertPixel(canvas, 75,15, 0,255,0,255);
+ _assertPixel(canvas, 75,16, 0,255,0,255);
+ _assertPixel(canvas, 75,34, 0,255,0,255);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
+ _assertPixel(canvas, 75,36, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.closed.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.closed.html
index 5f16ac95005..263c6c6c76f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.closed.html
@@ -19,27 +19,26 @@
var t = async_test("Line caps are not drawn at the corners of an unclosed rectangle");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.invalid.html
index c62e71f6e29..22e98ee3263 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.invalid.html
@@ -19,33 +19,32 @@
var t = async_test("Setting lineCap to invalid values is ignored");
_addTest(function(canvas, ctx) {
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'invalid';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'invalid';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'ROUND';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'ROUND';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round\0';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round\0';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round ';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round ';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = "";
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-
-ctx.lineCap = 'butt';
-ctx.lineCap = 'bevel';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = "";
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'bevel';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.open.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.open.html
index fc5aca585c5..6f7918a1c9f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.open.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.open.html
@@ -19,27 +19,26 @@
var t = async_test("Line caps are drawn at the corners of an unclosed rectangle");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.lineTo(200, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.lineTo(200, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.round.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.round.html
index 48411812de0..3990ad384ea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.round.html
@@ -19,58 +19,57 @@
var t = async_test("lineCap 'round' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-var tol = 1; // tolerance to avoid antialiasing artifacts
+ var tol = 1; // tolerance to avoid antialiasing artifacts
-ctx.lineCap = 'round';
-ctx.lineWidth = 20;
+ ctx.lineCap = 'round';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(35-tol, 15);
-ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
-ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(35-tol, 15);
+ ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
+ ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
+ ctx.fill();
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(85+tol, 15);
-ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
-ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(85+tol, 15);
+ ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
+ ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
+ ctx.fill();
-_assertPixel(canvas, 17,6, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 32,6, 0,255,0,255);
-_assertPixel(canvas, 17,43, 0,255,0,255);
-_assertPixel(canvas, 25,43, 0,255,0,255);
-_assertPixel(canvas, 32,43, 0,255,0,255);
-
-_assertPixel(canvas, 67,6, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 82,6, 0,255,0,255);
-_assertPixel(canvas, 67,43, 0,255,0,255);
-_assertPixel(canvas, 75,43, 0,255,0,255);
-_assertPixel(canvas, 82,43, 0,255,0,255);
+ _assertPixel(canvas, 17,6, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 32,6, 0,255,0,255);
+ _assertPixel(canvas, 17,43, 0,255,0,255);
+ _assertPixel(canvas, 25,43, 0,255,0,255);
+ _assertPixel(canvas, 32,43, 0,255,0,255);
+ _assertPixel(canvas, 67,6, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 82,6, 0,255,0,255);
+ _assertPixel(canvas, 67,43, 0,255,0,255);
+ _assertPixel(canvas, 75,43, 0,255,0,255);
+ _assertPixel(canvas, 82,43, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.square.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.square.html
index 3423fa79e47..8d6af320fea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.square.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.square.html
@@ -19,42 +19,41 @@
var t = async_test("lineCap 'square' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'square';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 5, 20, 40);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 5, 20, 40);
-
-_assertPixel(canvas, 25,4, 0,255,0,255);
-_assertPixel(canvas, 25,5, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 25,44, 0,255,0,255);
-_assertPixel(canvas, 25,45, 0,255,0,255);
-_assertPixel(canvas, 25,46, 0,255,0,255);
-
-_assertPixel(canvas, 75,4, 0,255,0,255);
-_assertPixel(canvas, 75,5, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 75,44, 0,255,0,255);
-_assertPixel(canvas, 75,45, 0,255,0,255);
-_assertPixel(canvas, 75,46, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 5, 20, 40);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 5, 20, 40);
+
+ _assertPixel(canvas, 25,4, 0,255,0,255);
+ _assertPixel(canvas, 25,5, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 25,44, 0,255,0,255);
+ _assertPixel(canvas, 25,45, 0,255,0,255);
+ _assertPixel(canvas, 25,46, 0,255,0,255);
+
+ _assertPixel(canvas, 75,4, 0,255,0,255);
+ _assertPixel(canvas, 75,5, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 75,44, 0,255,0,255);
+ _assertPixel(canvas, 75,45, 0,255,0,255);
+ _assertPixel(canvas, 75,46, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.valid.html
index 2c02ede579b..a11d32030ea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cap.valid.html
@@ -19,15 +19,14 @@
var t = async_test("Setting lineCap to valid values works");
_addTest(function(canvas, ctx) {
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'round';
-_assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
-
-ctx.lineCap = 'square';
-_assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
+ ctx.lineCap = 'round';
+ _assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
+ ctx.lineCap = 'square';
+ _assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cross.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cross.html
index a664e372534..e6866e3e40a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cross.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.cross.html
@@ -19,24 +19,23 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'bevel';
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(110, 50);
-ctx.lineTo(110, 60);
-ctx.lineTo(100, 60);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'bevel';
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(110, 50);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(100, 60);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.defaults.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.defaults.html
index efea3ca1aaf..daa4634387c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.defaults.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.defaults.html
@@ -19,11 +19,10 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html
index 29bd98e5e52..89a234ecc38 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.invalid.strokestyle.html
@@ -19,18 +19,17 @@
var t = async_test("Verify correct behavior of canvas on an invalid strokeStyle()");
_addTest(function(canvas, ctx) {
-ctx.strokeStyle = 'rgb(0, 255, 0)';
-ctx.strokeStyle = 'nonsense';
-ctx.lineWidth = 200;
-ctx.moveTo(0,100);
-ctx.lineTo(200,100);
-ctx.stroke();
-var imageData = ctx.getImageData(0, 0, 200, 200);
-var imgdata = imageData.data;
-_assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
-_assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
-_assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
-
+ ctx.strokeStyle = 'rgb(0, 255, 0)';
+ ctx.strokeStyle = 'nonsense';
+ ctx.lineWidth = 200;
+ ctx.moveTo(0,100);
+ ctx.lineTo(200,100);
+ ctx.stroke();
+ var imageData = ctx.getImageData(0, 0, 200, 200);
+ var imgdata = imageData.data;
+ _assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
+ _assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
+ _assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.bevel.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.bevel.html
index c1320c2c0b3..041e9a16058 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.bevel.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.bevel.html
@@ -19,61 +19,60 @@
var t = async_test("lineJoin 'bevel' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'bevel';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.lineTo(40-tol, 20);
-ctx.lineTo(30, 10+tol);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.lineTo(90+tol, 20);
-ctx.lineTo(80, 10-tol);
-ctx.fill();
-
-_assertPixel(canvas, 34,16, 0,255,0,255);
-_assertPixel(canvas, 34,15, 0,255,0,255);
-_assertPixel(canvas, 35,15, 0,255,0,255);
-_assertPixel(canvas, 36,15, 0,255,0,255);
-_assertPixel(canvas, 36,14, 0,255,0,255);
-
-_assertPixel(canvas, 84,16, 0,255,0,255);
-_assertPixel(canvas, 84,15, 0,255,0,255);
-_assertPixel(canvas, 85,15, 0,255,0,255);
-_assertPixel(canvas, 86,15, 0,255,0,255);
-_assertPixel(canvas, 86,14, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.lineTo(40-tol, 20);
+ ctx.lineTo(30, 10+tol);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.lineTo(90+tol, 20);
+ ctx.lineTo(80, 10-tol);
+ ctx.fill();
+
+ _assertPixel(canvas, 34,16, 0,255,0,255);
+ _assertPixel(canvas, 34,15, 0,255,0,255);
+ _assertPixel(canvas, 35,15, 0,255,0,255);
+ _assertPixel(canvas, 36,15, 0,255,0,255);
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+
+ _assertPixel(canvas, 84,16, 0,255,0,255);
+ _assertPixel(canvas, 84,15, 0,255,0,255);
+ _assertPixel(canvas, 85,15, 0,255,0,255);
+ _assertPixel(canvas, 86,15, 0,255,0,255);
+ _assertPixel(canvas, 86,14, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.closed.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.closed.html
index 6fd9d9d300b..a52219cccef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.closed.html
@@ -19,26 +19,25 @@
var t = async_test("Line joins are drawn at the corner of a closed rectangle");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.invalid.html
index a1c5aa0dda8..3c34ef34751 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.invalid.html
@@ -19,33 +19,32 @@
var t = async_test("Setting lineJoin to invalid values is ignored");
_addTest(function(canvas, ctx) {
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'invalid';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'invalid';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'ROUND';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'ROUND';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round\0';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round\0';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round ';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round ';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = "";
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'butt';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = "";
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'butt';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.miter.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.miter.html
index b4f8fbc9a40..5a3472e92d3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.miter.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.miter.html
@@ -19,52 +19,51 @@
var t = async_test("lineJoin 'miter' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 20;
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillRect(10, 10, 30, 20);
-ctx.fillRect(20, 10, 20, 30);
+ ctx.fillRect(10, 10, 30, 20);
+ ctx.fillRect(20, 10, 20, 30);
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
-ctx.fillRect(60, 10, 30, 20);
-ctx.fillRect(70, 10, 20, 30);
+ ctx.fillRect(60, 10, 30, 20);
+ ctx.fillRect(70, 10, 20, 30);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-_assertPixel(canvas, 39,11, 0,255,0,255);
-_assertPixel(canvas, 40,10, 0,255,0,255);
-_assertPixel(canvas, 41,9, 0,255,0,255);
-_assertPixel(canvas, 42,8, 0,255,0,255);
-
-_assertPixel(canvas, 88,12, 0,255,0,255);
-_assertPixel(canvas, 89,11, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 91,9, 0,255,0,255);
-_assertPixel(canvas, 92,8, 0,255,0,255);
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+ _assertPixel(canvas, 39,11, 0,255,0,255);
+ _assertPixel(canvas, 40,10, 0,255,0,255);
+ _assertPixel(canvas, 41,9, 0,255,0,255);
+ _assertPixel(canvas, 42,8, 0,255,0,255);
+ _assertPixel(canvas, 88,12, 0,255,0,255);
+ _assertPixel(canvas, 89,11, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 91,9, 0,255,0,255);
+ _assertPixel(canvas, 92,8, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.open.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.open.html
index 162b1f87b29..55b7a8b49e8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.open.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.open.html
@@ -19,26 +19,25 @@
var t = async_test("Line joins are not drawn at the corner of an unclosed rectangle");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.lineTo(100, 50);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.parallel.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.parallel.html
index c26182b0b47..cd736b503d4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.parallel.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.parallel.html
@@ -19,23 +19,22 @@
var t = async_test("Line joins are drawn at 180-degree joins");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 300;
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.lineTo(0, 25);
-ctx.lineTo(-100, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 300;
+ ctx.lineJoin = 'round';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(-100, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.round.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.round.html
index f1e60182f3c..fb968b99667 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.round.html
@@ -19,59 +19,58 @@
var t = async_test("lineJoin 'round' is rendered correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'round';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-_assertPixel(canvas, 36,14, 0,255,0,255);
-_assertPixel(canvas, 36,13, 0,255,0,255);
-_assertPixel(canvas, 37,13, 0,255,0,255);
-_assertPixel(canvas, 38,13, 0,255,0,255);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-
-_assertPixel(canvas, 86,14, 0,255,0,255);
-_assertPixel(canvas, 86,13, 0,255,0,255);
-_assertPixel(canvas, 87,13, 0,255,0,255);
-_assertPixel(canvas, 88,13, 0,255,0,255);
-_assertPixel(canvas, 88,12, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'round';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+ _assertPixel(canvas, 36,13, 0,255,0,255);
+ _assertPixel(canvas, 37,13, 0,255,0,255);
+ _assertPixel(canvas, 38,13, 0,255,0,255);
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+
+ _assertPixel(canvas, 86,14, 0,255,0,255);
+ _assertPixel(canvas, 86,13, 0,255,0,255);
+ _assertPixel(canvas, 87,13, 0,255,0,255);
+ _assertPixel(canvas, 88,13, 0,255,0,255);
+ _assertPixel(canvas, 88,12, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.valid.html
index 57179641f7d..3e5e200cb58 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.join.valid.html
@@ -19,15 +19,14 @@
var t = async_test("Setting lineJoin to valid values works");
_addTest(function(canvas, ctx) {
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'round';
-_assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
-
-ctx.lineJoin = 'miter';
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ ctx.lineJoin = 'round';
+ _assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
+ ctx.lineJoin = 'miter';
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.acute.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.acute.html
index 7807d5942da..6acba4f3d29 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.acute.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.acute.html
@@ -19,33 +19,32 @@
var t = async_test("Miter joins are drawn correctly with acute angles");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 2.614;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 2.613;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 2.614;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 2.613;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html
index 9c31cdd4ff6..542851d580b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.exceeded.html
@@ -19,25 +19,24 @@
var t = async_test("Miter joins are not drawn when the miter limit is exceeded");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.invalid.html
index 994956123c3..826a6e24a7e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.invalid.html
@@ -19,41 +19,40 @@
var t = async_test("Setting miterLimit to invalid values is ignored");
_addTest(function(canvas, ctx) {
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 0;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 0;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -1;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -1;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = NaN;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = NaN;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 'string';
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 'string';
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = true;
-_assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
-
-ctx.miterLimit = 1.5;
-ctx.miterLimit = false;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = true;
+ _assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = false;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html
index 33d96f36cc8..68eeb061627 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.lineedge.html
@@ -19,22 +19,21 @@
var t = async_test("Miter joins are not drawn when the miter limit is exceeded at the corners of a zero-height rectangle");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.strokeRect(100, 25, 200, 0);
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.strokeRect(100, 25, 200, 0);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html
index 73507f623c2..2dd08f6afc0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.obtuse.html
@@ -19,33 +19,32 @@
var t = async_test("Miter joins are drawn correctly with obtuse angles");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 1600;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.083;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.082;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 1600;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.083;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.082;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html
index a8b528bf056..7ae9f5e232a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.rightangle.html
@@ -19,25 +19,24 @@
var t = async_test("Miter joins are not drawn when the miter limit is exceeded, on exact right angles");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.valid.html
index a96c1cd1843..51b00c292d8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.valid.html
@@ -19,18 +19,17 @@
var t = async_test("Setting miterLimit to valid values works");
_addTest(function(canvas, ctx) {
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = "1e1";
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+ ctx.miterLimit = "1e1";
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-ctx.miterLimit = 1/1024;
-_assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
-
-ctx.miterLimit = 1000;
-_assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
+ ctx.miterLimit = 1/1024;
+ _assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
+ ctx.miterLimit = 1000;
+ _assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.within.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.within.html
index c5d71cda574..f4388660094 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.within.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.miter.within.html
@@ -19,25 +19,24 @@
var t = async_test("Miter joins are drawn when the miter limit is not quite exceeded");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.416;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.416;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.union.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.union.html
index e9f5a85e02a..9d43cebee7d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.union.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.union.html
@@ -19,27 +19,26 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 24);
-ctx.lineTo(100, 25);
-ctx.lineTo(0, 26);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 24);
+ ctx.lineTo(100, 25);
+ ctx.lineTo(0, 26);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.basic.html
index b0fe6c46650..f2e9a9f86dd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.basic.html
@@ -19,44 +19,43 @@
var t = async_test("lineWidth determines the width of line strokes");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 20;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
-
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 20;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
+
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.invalid.html
index a5a1a6d8d7e..363060cf6d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.invalid.html
@@ -19,41 +19,40 @@
var t = async_test("Setting lineWidth to invalid values is ignored");
_addTest(function(canvas, ctx) {
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 0;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 0;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -1;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -1;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = NaN;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = NaN;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 'string';
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 'string';
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = true;
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-
-ctx.lineWidth = 1.5;
-ctx.lineWidth = false;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = true;
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = false;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html
index 9c50a0d68e1..6c4ec52b5d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.scaledefault.html
@@ -19,21 +19,20 @@
var t = async_test("Default lineWidth strokes are affected by scale transformations");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(50, 50);
-ctx.strokeStyle = '#0f0';
-ctx.moveTo(0, 0.5);
-ctx.lineTo(2, 0.5);
-ctx.stroke();
-
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 50,5, 0,255,0,255);
-_assertPixel(canvas, 50,45, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.scale(50, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.moveTo(0, 0.5);
+ ctx.lineTo(2, 0.5);
+ ctx.stroke();
+
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 50,5, 0,255,0,255);
+ _assertPixel(canvas, 50,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.transformed.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.transformed.html
index f42f859a31e..600ce93fb74 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.transformed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.transformed.html
@@ -19,50 +19,49 @@
var t = async_test("Line stroke widths are affected by scale transformations");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 4;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.save();
- ctx.scale(5, 1);
- ctx.beginPath();
- ctx.moveTo(5, 15);
- ctx.lineTo(5, 35);
- ctx.stroke();
-ctx.restore();
+ ctx.lineWidth = 4;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.save();
+ ctx.scale(5, 1);
+ ctx.beginPath();
+ ctx.moveTo(5, 15);
+ ctx.lineTo(5, 35);
+ ctx.stroke();
+ ctx.restore();
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.save();
- ctx.scale(-5, 1);
- ctx.beginPath();
- ctx.moveTo(-15, 15);
- ctx.lineTo(-15, 35);
- ctx.stroke();
-ctx.restore();
-ctx.fillRect(65, 15, 20, 20);
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.save();
+ ctx.scale(-5, 1);
+ ctx.beginPath();
+ ctx.moveTo(-15, 15);
+ ctx.lineTo(-15, 35);
+ ctx.stroke();
+ ctx.restore();
+ ctx.fillRect(65, 15, 20, 20);
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
-
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.valid.html b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.valid.html
index 9078809d65b..1a76b0ed4cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/line-styles/2d.line.width.valid.html
@@ -19,18 +19,17 @@
var t = async_test("Setting lineWidth to valid values works");
_addTest(function(canvas, ctx) {
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = "1e1";
-_assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
+ ctx.lineWidth = "1e1";
+ _assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
-ctx.lineWidth = 1/1024;
-_assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
-
-ctx.lineWidth = 1000;
-_assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
+ ctx.lineWidth = 1/1024;
+ _assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
+ ctx.lineWidth = 1000;
+ _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html b/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html
new file mode 100644
index 00000000000..1c4e74866ab
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/element/manual/drawing-images-to-the-canvas/drawimage_zerosize-image.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<title>Canvas test: 2d.drawImage.zerosource.image</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+<link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
+<body class="show_output">
+
+<h1>2d.drawImage.zerosource.image</h1>
+<p class="desc">drawImage with zero-sized source rectangle from image draws nothing without exception</p>
+
+
+<p class="output">Actual output:</p>
+<canvas id="c" class="output" width="100" height="50"><p class="fallback">FAIL (fallback content)</p></canvas>
+<p class="output expectedtext">Expected output:<p><img src="/images/green-100x50.png" class="output expected" id="expected" alt="">
+<ul id="d"></ul>
+<script>
+var t = async_test("drawImage with zero-sized source rectangle from image draws nothing without exception");
+_addTest(function(canvas, ctx) {
+
+ctx.fillStyle = '#0f0';
+ctx.fillRect(0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red-zerowidth.svg'), 0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red-zeroheight.svg'), 0, 0, 100, 50);
+ctx.drawImage(document.getElementById('red-zerosize.svg'), 0, 0, 100, 50);
+_assertPixel(canvas, 50,25, 0,255,0,255);
+
+
+});
+</script>
+<img src="/images/red-zerowidth.svg" id="red-zerowidth.svg" class="resource">
+<img src="/images/red-zeroheight.svg" id="red-zeroheight.svg" class="resource">
+<img src="/images/red-zerosize.svg" id="red-zerosize.svg" class="resource">
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html
index 838492d182a..85ebff4c0ab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.1.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws pi/2 .. -pi anticlockwise correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html
index 7ddcbcbe477..7eefabd993c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.2.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws -3pi/2 .. -pi anticlockwise correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html
index f5df8a2bf2c..899c50dc904 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.3.html
@@ -19,15 +19,14 @@
var t = async_test("arc() wraps angles mod 2pi when anticlockwise and end > start+2pi");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html
index 635112f76bc..3f1bd84d698 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.4.html
@@ -19,18 +19,17 @@
var t = async_test("arc() draws a full circle when clockwise and end > start+2pi");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html
index 59edd27bbef..2373bd4f0a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.5.html
@@ -19,15 +19,14 @@
var t = async_test("arc() wraps angles mod 2pi when clockwise and start > end+2pi");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html
index 83f960b60e2..b0b03cff79f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.angle.6.html
@@ -19,18 +19,17 @@
var t = async_test("arc() draws a full circle when anticlockwise and start > end+2pi");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.default.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.default.html
index 51c1f1a8f80..b52941fe3f2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.default.html
@@ -19,15 +19,14 @@
var t = async_test("arc() with missing last argument defaults to clockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.empty.html
index bff80290015..295ee4bbb29 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.empty.html
@@ -19,15 +19,14 @@
var t = async_test("arc() with an empty path does not draw a straight line to the start point");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.end.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.end.html
index aa26b659218..a581a40e8e9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.end.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.end.html
@@ -19,17 +19,16 @@
var t = async_test("arc() adds the end point of the arc to the subpath");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(-100, 0);
-ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(-100, 0);
+ ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.negative.html
index 9d1f4d89193..fd81ebadcd7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.negative.html
@@ -19,10 +19,9 @@
var t = async_test("arc() with negative radius throws INDEX_SIZE_ERR");
_addTest(function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
-var path = new Path2D();
-assert_throws_dom("INDEX_SIZE_ERR", function() { path.arc(10, 10, -5, 0, 1, false); });
-
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arc(10, 10, -5, 0, 1, false); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html
index 63a472ba9af..982829013d7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonempty.html
@@ -19,16 +19,15 @@
var t = async_test("arc() with a non-empty path does draw a straight line to the start point");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html
index 04d51bffc0f..a1b15e7a88e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.nonfinite.html
@@ -19,58 +19,57 @@
var t = async_test("arc() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
-ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
-ctx.arc(0, 0, 50, 0, Infinity, true);
-ctx.arc(0, 0, 50, 0, -Infinity, true);
-ctx.arc(0, 0, 50, 0, NaN, true);
-ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, 50, 0, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(0, Infinity, 50, 0, Infinity, true);
-ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(0, 0, Infinity, 0, Infinity, true);
-ctx.arc(0, 0, 50, Infinity, Infinity, true);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, 0, Infinity, true);
+ ctx.arc(0, 0, 50, 0, -Infinity, true);
+ ctx.arc(0, 0, 50, 0, NaN, true);
+ ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, 50, 0, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, 50, 0, Infinity, true);
+ ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, 0, Infinity, 0, Infinity, true);
+ ctx.arc(0, 0, 50, Infinity, Infinity, true);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html
index c100c6476fa..951c9ae26c3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.1.html
@@ -19,35 +19,34 @@
var t = async_test("Non-uniformly scaled arcs are the right shape");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(2, 0.5);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
-ctx.fill();
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-25, 50);
-ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(75, 50);
-ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, -25);
-ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, 125);
-ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
-ctx.fill();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 0.5);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+ ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-25, 50);
+ ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(75, 50);
+ ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, -25);
+ ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, 125);
+ ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html
index 1045e402769..6b39e162222 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.scale.2.html
@@ -19,25 +19,24 @@
var t = async_test("Highly scaled arcs are the right shape");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(100, 100);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 1.2;
-ctx.beginPath();
-ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,25, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(100, 100);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 1.2;
+ ctx.beginPath();
+ ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,25, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html
index c97c833ec1a..3bc81bd77a7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.1.html
@@ -19,19 +19,18 @@
var t = async_test("arc() with lineWidth > 2*radius is drawn sensibly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html
index 58c51e32ec8..e3b14a782f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.selfintersect.2.html
@@ -19,23 +19,22 @@
var t = async_test("arc() with lineWidth > 2*radius is drawn sensibly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 180;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 97,1, 0,255,0,255);
-_assertPixel(canvas, 97,2, 0,255,0,255);
-_assertPixel(canvas, 97,3, 0,255,0,255);
-_assertPixel(canvas, 2,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 180;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 97,1, 0,255,0,255);
+ _assertPixel(canvas, 97,2, 0,255,0,255);
+ _assertPixel(canvas, 97,3, 0,255,0,255);
+ _assertPixel(canvas, 2,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html
index 29bf2cf6532..8a456841ad6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.1.html
@@ -19,20 +19,19 @@
var t = async_test("arc() from 0 to pi does not draw anything in the wrong half");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html
index aad3a519645..f820eed761e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.2.html
@@ -19,20 +19,19 @@
var t = async_test("arc() from 0 to pi draws stuff in the right half");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html
index 8f9e2735828..aa08d441944 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.3.html
@@ -19,19 +19,18 @@
var t = async_test("arc() from 0 to -pi/2 does not draw anything in the wrong quadrant");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html
index 4efa26369f9..b00d4468f2b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.4.html
@@ -19,19 +19,18 @@
var t = async_test("arc() from 0 to -pi/2 draws stuff in the right quadrant");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 150;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 150;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html
index 21727d4f499..f5574d2773e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.shape.5.html
@@ -19,19 +19,18 @@
var t = async_test("arc() from 0 to 5pi does not draw crazy things");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html
index a07eb101bd8..6312efb3e89 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.1.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws nothing when end = start + 2pi-e and anticlockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html
index 5ea0c1e60f0..132c2d38ddf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.2.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws a full circle when end = start + 2pi-e and clockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html
index 8e1d50e002f..204ed54a1ec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.3.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws a full circle when end = start + 2pi+e and anticlockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html
index 914fc4b18d8..d5535a79497 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.twopie.4.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws nothing when end = start + 2pi+e and clockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html
index b648c869adc..2c93425b1e1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.1.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws nothing when startAngle = endAngle and anticlockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html
index 4aab17a7a5a..c290c2f32f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zero.2.html
@@ -19,15 +19,14 @@
var t = async_test("arc() draws nothing when startAngle = endAngle and clockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html
index 6f50bb474f9..f75403b2f34 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arc.zeroradius.html
@@ -19,16 +19,15 @@
var t = async_test("arc() with zero radius draws a line to the start point");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00'
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 0, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00'
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 0, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html
index 9b963505ee2..01c8091c463 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.1.html
@@ -19,27 +19,26 @@
var t = async_test("arcTo() has no effect if P0 = P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(0, 25, 50, 1000, 1);
-ctx.lineTo(100, 25);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 100, 25, 1);
-ctx.stroke();
-
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(0, 25, 50, 1000, 1);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html
index 4cabedd056a..d216949aae9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.coincide.2.html
@@ -19,17 +19,16 @@
var t = async_test("arcTo() draws a straight line to P1 if P1 = P2");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 25, 1);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html
index 393c7a7f673..e91e2e4b1b4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.1.html
@@ -19,24 +19,23 @@
var t = async_test("arcTo() with all points on a line, and P1 between P0/P2, draws a straight line to P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 200, 25, 1);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, 100, 25, 1);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 200, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html
index 7dc386b5183..97b1339295c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.2.html
@@ -19,24 +19,23 @@
var t = async_test("arcTo() with all points on a line, and P2 between P0/P1, draws a straight line to P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 10, 25, 1);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 110, 25, 1);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 10, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 110, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html
index 76930e5fd12..2f4394f038d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.collinear.3.html
@@ -19,29 +19,28 @@
var t = async_test("arcTo() with all points on a line, and P0 between P1/P2, draws a straight line to P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 1);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 0, 25, 1);
-ctx.stroke();
-
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, -200, 25, 1);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 0, 25, 1);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, -200, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html
index 756cfe602c7..2781bcbba37 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.1.html
@@ -19,15 +19,14 @@
var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arcTo(100, 50, 200, 50, 0.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arcTo(100, 50, 200, 50, 0.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html
index 18b1992d89d..f5da07c1c6a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.ensuresubpath.2.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the first control point is added");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html
index 78f4fcebf7b..0091ca2a671 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.negative.html
@@ -19,10 +19,9 @@
var t = async_test("arcTo() with negative radius throws an exception");
_addTest(function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
-var path = new Path2D();
-assert_throws_dom("INDEX_SIZE_ERR", function() { path.arcTo(10, 10, 20, 20, -5); });
-
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arcTo(10, 10, 20, 20, -5); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html
index d05e05d2781..0d7be1d3608 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.nonfinite.html
@@ -19,56 +19,55 @@
var t = async_test("arcTo() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arcTo(Infinity, 50, 0, 50, 0);
-ctx.arcTo(-Infinity, 50, 0, 50, 0);
-ctx.arcTo(NaN, 50, 0, 50, 0);
-ctx.arcTo(0, Infinity, 0, 50, 0);
-ctx.arcTo(0, -Infinity, 0, 50, 0);
-ctx.arcTo(0, NaN, 0, 50, 0);
-ctx.arcTo(0, 50, Infinity, 50, 0);
-ctx.arcTo(0, 50, -Infinity, 50, 0);
-ctx.arcTo(0, 50, NaN, 50, 0);
-ctx.arcTo(0, 50, 0, Infinity, 0);
-ctx.arcTo(0, 50, 0, -Infinity, 0);
-ctx.arcTo(0, 50, 0, NaN, 0);
-ctx.arcTo(0, 50, 0, 50, Infinity);
-ctx.arcTo(0, 50, 0, 50, -Infinity);
-ctx.arcTo(0, 50, 0, 50, NaN);
-ctx.arcTo(Infinity, Infinity, 0, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, 50, 0, Infinity, 0);
-ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, 0, 50, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(0, Infinity, 0, Infinity, 0);
-ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(0, Infinity, 0, 50, Infinity);
-ctx.arcTo(0, 50, Infinity, Infinity, 0);
-ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(0, 50, Infinity, 50, Infinity);
-ctx.arcTo(0, 50, 0, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arcTo(Infinity, 50, 0, 50, 0);
+ ctx.arcTo(-Infinity, 50, 0, 50, 0);
+ ctx.arcTo(NaN, 50, 0, 50, 0);
+ ctx.arcTo(0, Infinity, 0, 50, 0);
+ ctx.arcTo(0, -Infinity, 0, 50, 0);
+ ctx.arcTo(0, NaN, 0, 50, 0);
+ ctx.arcTo(0, 50, Infinity, 50, 0);
+ ctx.arcTo(0, 50, -Infinity, 50, 0);
+ ctx.arcTo(0, 50, NaN, 50, 0);
+ ctx.arcTo(0, 50, 0, Infinity, 0);
+ ctx.arcTo(0, 50, 0, -Infinity, 0);
+ ctx.arcTo(0, 50, 0, NaN, 0);
+ ctx.arcTo(0, 50, 0, 50, Infinity);
+ ctx.arcTo(0, 50, 0, 50, -Infinity);
+ ctx.arcTo(0, 50, 0, 50, NaN);
+ ctx.arcTo(Infinity, Infinity, 0, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, 50, 0, Infinity, 0);
+ ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, 0, 50, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(0, Infinity, 0, Infinity, 0);
+ ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, 0, 50, Infinity);
+ ctx.arcTo(0, 50, Infinity, Infinity, 0);
+ ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, 50, Infinity, 50, Infinity);
+ ctx.arcTo(0, 50, 0, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html
index 00d9f99b96a..6645f052603 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.scale.html
@@ -19,28 +19,27 @@
var t = async_test("arcTo scales the curve, not just the control points");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.scale(0.1, 1);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-1000, 0);
-ctx.fill();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.scale(0.1, 1);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-1000, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html
index 0caf25048d3..4617b2cbbb6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve1.html
@@ -19,41 +19,40 @@
var t = async_test("arcTo() curves in the right kind of shape");
_addTest(function(canvas, ctx) {
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-_assertPixel(canvas, 65,45, 0,255,0,255);
-
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
+ _assertPixel(canvas, 65,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html
index 3e1677bec01..bcc4326eea2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.curve2.html
@@ -19,40 +19,39 @@
var t = async_test("arcTo() curves in the right kind of shape");
_addTest(function(canvas, ctx) {
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
-ctx.fill();
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html
index 8a41dcd7b61..829c70f5f47 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.end.html
@@ -19,21 +19,20 @@
var t = async_test("arcTo() does not draw anything from P1 to P2");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.arcTo(-100, 25, 200, 25, 10);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.arcTo(-100, 25, 200, 25, 10);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html
index 1ee229ef327..0abeedf433d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.shape.start.html
@@ -19,21 +19,20 @@
var t = async_test("arcTo() draws a straight line from P0 to P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(200, 25, 200, 50, 10);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(200, 25, 200, 50, 10);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html
index 32811f23005..5aa8562b1df 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.transformation.html
@@ -19,27 +19,26 @@
var t = async_test("arcTo joins up to the last subpath point correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-100, 0);
-ctx.fill();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html
index 4bacbf0dbce..bb2cc1d3e36 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.1.html
@@ -19,24 +19,23 @@
var t = async_test("arcTo() with zero radius draws a straight line from P0 to P1");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 100, 0);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(0, -25);
-ctx.arcTo(50, -25, 50, 50, 0);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 100, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(0, -25);
+ ctx.arcTo(50, -25, 50, 50, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html
index 1f26b5942b2..d2eeee535d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.arcTo.zero.2.html
@@ -19,24 +19,23 @@
var t = async_test("arcTo() with zero radius draws a straight line from P0 to P1, even when all points are collinear");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 0);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 50, 25, 0);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 50, 25, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.beginPath.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.beginPath.html
index a21282cc3e5..316f6af9428 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.beginPath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.beginPath.html
@@ -19,14 +19,13 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html
index 7f90f7bde46..0c3d7f948b9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.basic.html
@@ -19,16 +19,15 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
index 1e6f8298c5a..ebcce3f48cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
index 875601c5dab..c269b72d333 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the first control point is added");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html
index e6da7b27267..6278a672830 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.nonfinite.html
@@ -19,90 +19,89 @@
var t = async_test("bezierCurveTo() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html
index d24b83786fc..e7a5d8b524c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.scaled.html
@@ -19,21 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-2, 3.1);
-ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-2, 3.1);
+ ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html
index 7ebe1e3460c..cbc28244252 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.bezierCurveTo.shape.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-2000, 3100);
-ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-2000, 3100);
+ ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html
index c49afd431ff..a5515e4f7ee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.1.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clip();
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clip();
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html
index dfba3b8164a..27e1ad0b0cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.basic.2.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(-100, 0, 100, 50);
-ctx.clip();
+ ctx.beginPath();
+ ctx.rect(-100, 0, 100, 50);
+ ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.empty.html
index ba7a869f5cd..17208ad797e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.empty.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.clip();
+ ctx.beginPath();
+ ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.intersect.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.intersect.html
index 1cdd9603d79..c1057f26457 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.intersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.intersect.html
@@ -19,21 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.beginPath();
-ctx.rect(50, 0, 50, 50)
-ctx.clip();
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.beginPath();
+ ctx.rect(50, 0, 50, 50)
+ ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html
index 893877f876d..66f03796021 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.unaffected.html
@@ -19,23 +19,22 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
+ ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
-ctx.lineTo(0, 0);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.lineTo(0, 0);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html
index 5e8fa814243..46e4db9b6c9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.1.html
@@ -19,26 +19,25 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html
index ae8fd4c4d94..9341353a8d1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.clip.winding.2.html
@@ -19,30 +19,29 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.clip();
-
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.lineTo(0, 0);
-ctx.clip();
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.clip();
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.empty.html
index e9840f195a3..898cdc5fa6d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.empty.html
@@ -19,13 +19,12 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.newline.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.newline.html
index 2ad2609e1ae..07ec4b2a829 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.newline.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.newline.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.closePath();
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.closePath();
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html
index 7538af29f30..648d7ad37af 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.closePath.nextpoint.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -1000);
-ctx.closePath();
-ctx.lineTo(1000, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -1000);
+ ctx.closePath();
+ ctx.lineTo(1000, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html
index 13ba8be5b6e..d46dc31d261 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.ellipse.basics.html
@@ -19,14 +19,13 @@
var t = async_test("Verify canvas throws error when drawing ellipse with negative radii.");
_addTest(function(canvas, ctx) {
-ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
-ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
-ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
-ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
-
+ ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
+ ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
+ ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
+ ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html
index 890c15cf4b2..010dbf43e1a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.basic.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html
index bd42e95181f..e00a6c8f550 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.closed.unaffected.html
@@ -19,21 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 10,40, 0,255,0,255);
-
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 10,40, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.overlap.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.overlap.html
index eb50ac6846b..08782ed11ee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.overlap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.overlap.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.rect(0, 0, 100, 50);
-ctx.closePath();
-ctx.rect(10, 10, 80, 30);
-ctx.fill();
-
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.rect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.rect(10, 10, 80, 30);
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html
index 5fbcd652601..ef9a2a0f939 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.add.html
@@ -19,23 +19,22 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html
index 963e5d3c75d..eecf0198e27 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.1.html
@@ -19,23 +19,22 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html
index 305d628b9e5..cf8b6a6ce98 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.2.html
@@ -19,22 +19,21 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html
index 4bda1bd248f..e056e330039 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.fill.winding.subtract.3.html
@@ -19,28 +19,27 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(-20, -20);
-ctx.lineTo(120, -20);
-ctx.lineTo(120, 70);
-ctx.lineTo(-20, 70);
-ctx.lineTo(-20, -20);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(120, -20);
+ ctx.lineTo(120, 70);
+ ctx.lineTo(-20, 70);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.initial.html
index ec17cc330aa..a3de93a7999 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.initial.html
@@ -19,13 +19,12 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html
index ecf184227d0..bc4bc560e56 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.arc.html
@@ -19,16 +19,15 @@
var t = async_test("isPointInPath() works on arcs");
_addTest(function(canvas, ctx) {
-ctx.arc(50, 25, 10, 0, Math.PI, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-
+ ctx.arc(50, 25, 10, 0, Math.PI, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html
index 09cdfd2c9e2..22562c60a28 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.1.html
@@ -19,10 +19,9 @@
var t = async_test("isPointInPath() detects whether the point is inside the path");
_addTest(function(canvas, ctx) {
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html
index f2bd51a216f..9fc1060df8d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.2.html
@@ -19,10 +19,9 @@
var t = async_test("isPointInPath() detects whether the point is inside the path");
_addTest(function(canvas, ctx) {
-ctx.rect(20, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-
+ ctx.rect(20, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html
index fc30dfe4645..5e3edfcc809 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.basic.html
@@ -19,47 +19,46 @@
var t = async_test("Verify the winding rule in isPointInPath works for for rect path.");
_addTest(function(canvas, ctx) {
-canvas.width = 200;
-canvas.height = 200;
+ canvas.width = 200;
+ canvas.height = 200;
-// Testing default isPointInPath
-ctx.beginPath();
-ctx.rect(0, 0, 100, 100);
-ctx.rect(25, 25, 50, 50);
-_assertSame(ctx.isPointInPath(50, 50), true, "ctx.isPointInPath(50, 50)", "true");
-_assertSame(ctx.isPointInPath(NaN, 50), false, "ctx.isPointInPath(NaN, 50)", "false");
-_assertSame(ctx.isPointInPath(50, NaN), false, "ctx.isPointInPath(50, NaN)", "false");
+ // Testing default isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50), true, "ctx.isPointInPath(50, 50)", "true");
+ _assertSame(ctx.isPointInPath(NaN, 50), false, "ctx.isPointInPath(NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(50, NaN), false, "ctx.isPointInPath(50, NaN)", "false");
-// Testing nonzero isPointInPath
-ctx.beginPath();
-ctx.rect(0, 0, 100, 100);
-ctx.rect(25, 25, 50, 50);
-_assertSame(ctx.isPointInPath(50, 50, 'nonzero'), true, "ctx.isPointInPath(50, 50, 'nonzero')", "true");
+ // Testing nonzero isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'nonzero'), true, "ctx.isPointInPath(50, 50, 'nonzero')", "true");
-// Testing evenodd isPointInPath
-ctx.beginPath();
-ctx.rect(0, 0, 100, 100);
-ctx.rect(25, 25, 50, 50);
-_assertSame(ctx.isPointInPath(50, 50, 'evenodd'), false, "ctx.isPointInPath(50, 50, 'evenodd')", "false");
+ // Testing evenodd isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'evenodd'), false, "ctx.isPointInPath(50, 50, 'evenodd')", "false");
-// Testing extremely large scale
-ctx.save();
-ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE);
-ctx.beginPath();
-ctx.rect(-10, -10, 20, 20);
-_assertSame(ctx.isPointInPath(0, 0, 'nonzero'), true, "ctx.isPointInPath(0, 0, 'nonzero')", "true");
-_assertSame(ctx.isPointInPath(0, 0, 'evenodd'), true, "ctx.isPointInPath(0, 0, 'evenodd')", "true");
-ctx.restore();
-
-// Check with non-invertible ctm.
-ctx.save();
-ctx.scale(0, 0);
-ctx.beginPath();
-ctx.rect(-10, -10, 20, 20);
-_assertSame(ctx.isPointInPath(0, 0, 'nonzero'), false, "ctx.isPointInPath(0, 0, 'nonzero')", "false");
-_assertSame(ctx.isPointInPath(0, 0, 'evenodd'), false, "ctx.isPointInPath(0, 0, 'evenodd')", "false");
-ctx.restore();
+ // Testing extremely large scale
+ ctx.save();
+ ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), true, "ctx.isPointInPath(0, 0, 'nonzero')", "true");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), true, "ctx.isPointInPath(0, 0, 'evenodd')", "true");
+ ctx.restore();
+ // Check with non-invertible ctm.
+ ctx.save();
+ ctx.scale(0, 0);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), false, "ctx.isPointInPath(0, 0, 'nonzero')", "false");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), false, "ctx.isPointInPath(0, 0, 'evenodd')", "false");
+ ctx.restore();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html
index 576c4f26e99..b2f2d23724a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bezier.html
@@ -19,29 +19,28 @@
var t = async_test("isPointInPath() works on Bezier curves");
_addTest(function(canvas, ctx) {
-ctx.moveTo(25, 25);
-ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
-_assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
-_assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
-_assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
-_assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
-_assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
-_assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
-_assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
-_assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
-_assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
-_assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
-_assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
-_assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
-_assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
-
+ ctx.moveTo(25, 25);
+ ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
+ _assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
+ _assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
+ _assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
+ _assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
+ _assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
+ _assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
+ _assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
+ _assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
+ _assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
+ _assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
+ _assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
+ _assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html
index a9995208e4a..77cb495137d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.bigarc.html
@@ -19,16 +19,15 @@
var t = async_test("isPointInPath() works on unclosed arcs larger than 2pi");
_addTest(function(canvas, ctx) {
-ctx.arc(50, 25, 10, 0, 7, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-
+ ctx.arc(50, 25, 10, 0, 7, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html
index 01106f92a70..b00da5a2a71 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.edge.html
@@ -19,20 +19,19 @@
var t = async_test("isPointInPath() counts points on the path as being inside");
_addTest(function(canvas, ctx) {
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
-_assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
-_assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
-_assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
-_assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
-_assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
-_assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
-_assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
-
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
+ _assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
+ _assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
+ _assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
+ _assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
+ _assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
+ _assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
+ _assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html
index 5ba237094b4..3edfe01a2ae 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.empty.html
@@ -19,8 +19,7 @@
var t = async_test("isPointInPath() works when there is no path");
_addTest(function(canvas, ctx) {
-_assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
-
+ _assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html
index 1523f4ca81d..4ef541a4313 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.nonfinite.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() returns false for non-finite arguments");
_addTest(function(canvas, ctx) {
-ctx.rect(-100, -50, 200, 100);
-_assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
-_assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
-_assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
-
+ ctx.rect(-100, -50, 200, 100);
+ _assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
+ _assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
+ _assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html
index 4f3b38f6956..6431879eb66 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.outside.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() works on paths outside the canvas");
_addTest(function(canvas, ctx) {
-ctx.rect(0, -100, 20, 20);
-ctx.rect(20, -10, 20, 20);
-_assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
-_assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
-_assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
-_assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
-_assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-
+ ctx.rect(0, -100, 20, 20);
+ ctx.rect(20, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
+ _assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
+ _assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
+ _assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
+ _assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html
index 92e25e24983..5d664557d8e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.subpath.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() uses the current path, not just the subpath");
_addTest(function(canvas, ctx) {
-ctx.rect(0, 0, 20, 20);
-ctx.beginPath();
-ctx.rect(20, 0, 20, 20);
-ctx.closePath();
-ctx.rect(40, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-_assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
-
+ ctx.rect(0, 0, 20, 20);
+ ctx.beginPath();
+ ctx.rect(20, 0, 20, 20);
+ ctx.closePath();
+ ctx.rect(40, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+ _assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html
index a210993ab98..7268c3255ff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.1.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() handles transformations correctly");
_addTest(function(canvas, ctx) {
-ctx.translate(50, 0);
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-
+ ctx.translate(50, 0);
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html
index f74cdde1ef8..3adac7a4191 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.2.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() handles transformations correctly");
_addTest(function(canvas, ctx) {
-ctx.rect(50, 0, 20, 20);
-ctx.translate(50, 0);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(50, 0);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html
index 3469734dc94..8769c8a593b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.3.html
@@ -19,15 +19,14 @@
var t = async_test("isPointInPath() handles transformations correctly");
_addTest(function(canvas, ctx) {
-ctx.scale(-1, 1);
-ctx.rect(-70, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-
+ ctx.scale(-1, 1);
+ ctx.rect(-70, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html
index 94a2e159366..1bcc0bc3a3f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.transform.4.html
@@ -19,13 +19,12 @@
var t = async_test("isPointInPath() handles transformations correctly");
_addTest(function(canvas, ctx) {
-ctx.translate(50, 0);
-ctx.rect(50, 0, 20, 20);
-ctx.translate(0, 50);
-_assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
-_assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
-_assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
-
+ ctx.translate(50, 0);
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(0, 50);
+ _assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
+ _assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
+ _assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html
index 41aa9c695b8..2e3b711129e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.unclosed.html
@@ -19,13 +19,12 @@
var t = async_test("isPointInPath() works on unclosed subpaths");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(20, 0);
-ctx.lineTo(20, 20);
-ctx.lineTo(0, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(20, 0);
+ ctx.lineTo(20, 20);
+ ctx.lineTo(0, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html
index 82c78c7e378..ec225707974 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInPath.winding.html
@@ -19,28 +19,27 @@
var t = async_test("isPointInPath() uses the non-zero winding number rule");
_addTest(function(canvas, ctx) {
-// Create a square ring, using opposite windings to make a hole in the centre
-ctx.moveTo(0, 0);
-ctx.lineTo(50, 0);
-ctx.lineTo(50, 50);
-ctx.lineTo(0, 50);
-ctx.lineTo(0, 0);
-ctx.lineTo(10, 10);
-ctx.lineTo(10, 40);
-ctx.lineTo(40, 40);
-ctx.lineTo(40, 10);
-ctx.lineTo(10, 10);
-
-_assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
-_assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
-_assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
-_assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
-_assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
-_assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
-_assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
-_assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
-_assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
-
+ // Create a square ring, using opposite windings to make a hole in the centre
+ ctx.moveTo(0, 0);
+ ctx.lineTo(50, 0);
+ ctx.lineTo(50, 50);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(10, 10);
+ ctx.lineTo(10, 40);
+ ctx.lineTo(40, 40);
+ ctx.lineTo(40, 10);
+ ctx.lineTo(10, 10);
+
+ _assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
+ _assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
+ _assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
+ _assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
+ _assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
+ _assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
+ _assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
+ _assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
+ _assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html
index 1d1c9ba938d..e27baa15493 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInStroke.scaleddashes.html
@@ -19,21 +19,20 @@
var t = async_test("isPointInStroke() should return correct results on dashed paths at high scale factors");
_addTest(function(canvas, ctx) {
-var scale = 20;
-ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle
-ctx.scale(scale, scale);
-ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false);
-ctx.stroke();
-
-// hit-test the beginning of the dash (t=0)
-_assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true");
-// hit-test the middle of the dash (t=5)
-_assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true");
-// hit-test the end of the dash (t=9.8)
-_assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true");
-// hit-test past the end of the dash (t=10.2)
-_assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false");
-
+ var scale = 20;
+ ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle
+ ctx.scale(scale, scale);
+ ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false);
+ ctx.stroke();
+
+ // hit-test the beginning of the dash (t=0)
+ _assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true");
+ // hit-test the middle of the dash (t=5)
+ _assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true");
+ // hit-test the end of the dash (t=9.8)
+ _assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true");
+ // hit-test past the end of the dash (t=10.2)
+ _assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html
index 3bdd8f770c2..301c7c447d3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.invalid.html
@@ -19,32 +19,31 @@
var t = async_test("Verify isPointInPath throws exceptions with invalid inputs.");
_addTest(function(canvas, ctx) {
-canvas.width = 200;
-canvas.height = 200;
-path = new Path2D();
-path.rect(0, 0, 100, 100);
-path.rect(25, 25, 50, 50);
-// Testing invalid enumeration isPointInPath (w/ and w/o Path object');
-assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, 'gazonk'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(50, 50, 'gazonk'); });
-
-// Testing invalid type isPointInPath with Path object');
-assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'nonzero'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'evenodd'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, null); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, null); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'nonzero'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'evenodd'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, undefined); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'nonzero'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'evenodd'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'nonzero'); });
-assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'evenodd'); });
-
+ canvas.width = 200;
+ canvas.height = 200;
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ // Testing invalid enumeration isPointInPath (w/ and w/o Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, 'gazonk'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(50, 50, 'gazonk'); });
+
+ // Testing invalid type isPointInPath with Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, undefined); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'evenodd'); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html
index 38949b89c83..d71bd8a4c44 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.isPointInpath.multi.path.html
@@ -19,30 +19,29 @@
var t = async_test("Verify the winding rule in isPointInPath works for path object.");
_addTest(function(canvas, ctx) {
-canvas.width = 200;
-canvas.height = 200;
-
-// Testing default isPointInPath with Path object');
-path = new Path2D();
-path.rect(0, 0, 100, 100);
-path.rect(25, 25, 50, 50);
-_assertSame(ctx.isPointInPath(path, 50, 50), true, "ctx.isPointInPath(path, 50, 50)", "true");
-_assertSame(ctx.isPointInPath(path, 50, 50, undefined), true, "ctx.isPointInPath(path, 50, 50, undefined)", "true");
-_assertSame(ctx.isPointInPath(path, NaN, 50), false, "ctx.isPointInPath(path, NaN, 50)", "false");
-_assertSame(ctx.isPointInPath(path, 50, NaN), false, "ctx.isPointInPath(path, 50, NaN)", "false");
-
-// Testing nonzero isPointInPath with Path object');
-path = new Path2D();
-path.rect(0, 0, 100, 100);
-path.rect(25, 25, 50, 50);
-_assertSame(ctx.isPointInPath(path, 50, 50, 'nonzero'), true, "ctx.isPointInPath(path, 50, 50, 'nonzero')", "true");
-
-// Testing evenodd isPointInPath with Path object');
-path = new Path2D();
-path.rect(0, 0, 100, 100);
-path.rect(25, 25, 50, 50);
-assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd'));
-
+ canvas.width = 200;
+ canvas.height = 200;
+
+ // Testing default isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50), true, "ctx.isPointInPath(path, 50, 50)", "true");
+ _assertSame(ctx.isPointInPath(path, 50, 50, undefined), true, "ctx.isPointInPath(path, 50, 50, undefined)", "true");
+ _assertSame(ctx.isPointInPath(path, NaN, 50), false, "ctx.isPointInPath(path, NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(path, 50, NaN), false, "ctx.isPointInPath(path, 50, NaN)", "false");
+
+ // Testing nonzero isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50, 'nonzero'), true, "ctx.isPointInPath(path, 50, 50, 'nonzero')", "true");
+
+ // Testing evenodd isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd'));
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html
index 4a2cca3a3af..c6f2caa1968 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.basic.html
@@ -19,16 +19,15 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html
index 0fa8f1c0549..ada8f0ca296 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.1.html
@@ -19,15 +19,14 @@
var t = async_test("If there is no subpath, the point is added and nothing is drawn");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(100, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html
index e5b2aa335c2..ac1f9238ffd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.ensuresubpath.2.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the point is added and used for subsequent drawing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html
index 54b586176de..f403c6b5088 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nextpoint.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html
index 12643d65fd0..d7595db7d13 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.details.html
@@ -19,12 +19,11 @@
var t = async_test("lineTo() with Infinity/NaN for first arg still converts the second arg");
_addTest(function(canvas, ctx) {
-for (var arg1 of [Infinity, -Infinity, NaN]) {
- var converted = false;
- ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
- _assert(converted, "converted");
-}
-
+ for (var arg1 of [Infinity, -Infinity, NaN]) {
+ var converted = false;
+ ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
+ _assert(converted, "converted");
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html
index fa3acf53851..8246064ea34 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.lineTo.nonfinite.html
@@ -19,22 +19,21 @@
var t = async_test("lineTo() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(Infinity, 50);
-ctx.lineTo(-Infinity, 50);
-ctx.lineTo(NaN, 50);
-ctx.lineTo(0, Infinity);
-ctx.lineTo(0, -Infinity);
-ctx.lineTo(0, NaN);
-ctx.lineTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(Infinity, 50);
+ ctx.lineTo(-Infinity, 50);
+ ctx.lineTo(NaN, 50);
+ ctx.lineTo(0, Infinity);
+ ctx.lineTo(0, -Infinity);
+ ctx.lineTo(0, NaN);
+ ctx.lineTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html
index 3ab41dc0399..d08d67621eb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.basic.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 10, 50);
-ctx.moveTo(100, 0);
-ctx.lineTo(10, 0);
-ctx.lineTo(10, 50);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 90,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 10, 50);
+ ctx.moveTo(100, 0);
+ ctx.lineTo(10, 0);
+ ctx.lineTo(10, 50);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 90,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html
index 24307b4e9ed..384d9fb437e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.multiple.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 25);
-ctx.moveTo(100, 25);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 25);
+ ctx.moveTo(100, 25);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html
index 456b7538ace..2a3d69b6375 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.newsubpath.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.moveTo(100, 0);
-ctx.moveTo(100, 50);
-ctx.moveTo(0, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.moveTo(100, 0);
+ ctx.moveTo(100, 50);
+ ctx.moveTo(0, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html
index 4f61d9e58b9..c6cd6f81786 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.moveTo.nonfinite.html
@@ -19,21 +19,20 @@
var t = async_test("moveTo() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.moveTo(Infinity, 50);
-ctx.moveTo(-Infinity, 50);
-ctx.moveTo(NaN, 50);
-ctx.moveTo(0, Infinity);
-ctx.moveTo(0, -Infinity);
-ctx.moveTo(0, NaN);
-ctx.moveTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.moveTo(Infinity, 50);
+ ctx.moveTo(-Infinity, 50);
+ ctx.moveTo(NaN, 50);
+ ctx.moveTo(0, Infinity);
+ ctx.moveTo(0, -Infinity);
+ ctx.moveTo(0, NaN);
+ ctx.moveTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html
index 1c2da33f967..ffbf039440f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.basic.html
@@ -19,16 +19,15 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.quadraticCurveTo(100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.quadraticCurveTo(100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
index 6c75732daca..f8b8b515bab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the first control point is added (and nothing is drawn up to it)");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(100, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(100, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
index 8da6964cc2f..189c744c659 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
@@ -19,16 +19,15 @@
var t = async_test("If there is no subpath, the first control point is added");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(0, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(0, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html
index 4bc7107fca2..1488e78a00a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.nonfinite.html
@@ -19,38 +19,37 @@
var t = async_test("quadraticCurveTo() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.quadraticCurveTo(Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(NaN, 50, 0, 50);
-ctx.quadraticCurveTo(0, Infinity, 0, 50);
-ctx.quadraticCurveTo(0, -Infinity, 0, 50);
-ctx.quadraticCurveTo(0, NaN, 0, 50);
-ctx.quadraticCurveTo(0, 50, Infinity, 50);
-ctx.quadraticCurveTo(0, 50, -Infinity, 50);
-ctx.quadraticCurveTo(0, 50, NaN, 50);
-ctx.quadraticCurveTo(0, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, 0, -Infinity);
-ctx.quadraticCurveTo(0, 50, 0, NaN);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.quadraticCurveTo(Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(NaN, 50, 0, 50);
+ ctx.quadraticCurveTo(0, Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, -Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, NaN, 0, 50);
+ ctx.quadraticCurveTo(0, 50, Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, -Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, NaN, 50);
+ ctx.quadraticCurveTo(0, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, -Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, NaN);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html
index 4b6ffaa741b..90973a8f977 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.scaled.html
@@ -19,21 +19,20 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-1, 1.05);
-ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-1, 1.05);
+ ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html
index 58d35dc22f2..23725c24210 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.quadraticCurveTo.shape.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-1000, 1050);
-ctx.quadraticCurveTo(0, -1000, 1200, 1050);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-1000, 1050);
+ ctx.quadraticCurveTo(0, -1000, 1200, 1050);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.basic.html
index 296800decd5..716cd29af70 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.basic.html
@@ -19,13 +19,12 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.closed.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.closed.html
index 60a237770fa..385a88ab7ef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.closed.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.rect(100, 50, 100, 100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.rect(100, 50, 100, 100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.1.html
index 6f3338b8411..e1fd8052d8d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.1.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.rect(200, 100, 400, 1000);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.rect(200, 100, 400, 1000);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.2.html
index e5a1776dd64..d30bb111f12 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.end.2.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.rect(150, 150, 2000, 2000);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.rect(150, 150, 2000, 2000);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.negative.html
index e7e51371e16..b917137baea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.negative.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 50, 25);
-ctx.rect(100, 0, -50, 25);
-ctx.rect(0, 50, 50, -25);
-ctx.rect(100, 50, -50, -25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 50, 25);
+ ctx.rect(100, 0, -50, 25);
+ ctx.rect(0, 50, 50, -25);
+ ctx.rect(100, 50, -50, -25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html
index e2c5a4cff83..32b70ff2d8e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.newsubpath.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.rect(200, 25, 1, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.rect(200, 25, 1, 1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html
index b8517e8fa4d..c0d245a49c8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.nonfinite.html
@@ -19,38 +19,37 @@
var t = async_test("rect() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.rect(Infinity, 50, 1, 1);
-ctx.rect(-Infinity, 50, 1, 1);
-ctx.rect(NaN, 50, 1, 1);
-ctx.rect(0, Infinity, 1, 1);
-ctx.rect(0, -Infinity, 1, 1);
-ctx.rect(0, NaN, 1, 1);
-ctx.rect(0, 50, Infinity, 1);
-ctx.rect(0, 50, -Infinity, 1);
-ctx.rect(0, 50, NaN, 1);
-ctx.rect(0, 50, 1, Infinity);
-ctx.rect(0, 50, 1, -Infinity);
-ctx.rect(0, 50, 1, NaN);
-ctx.rect(Infinity, Infinity, 1, 1);
-ctx.rect(Infinity, Infinity, Infinity, 1);
-ctx.rect(Infinity, Infinity, Infinity, Infinity);
-ctx.rect(Infinity, Infinity, 1, Infinity);
-ctx.rect(Infinity, 50, Infinity, 1);
-ctx.rect(Infinity, 50, Infinity, Infinity);
-ctx.rect(Infinity, 50, 1, Infinity);
-ctx.rect(0, Infinity, Infinity, 1);
-ctx.rect(0, Infinity, Infinity, Infinity);
-ctx.rect(0, Infinity, 1, Infinity);
-ctx.rect(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.rect(Infinity, 50, 1, 1);
+ ctx.rect(-Infinity, 50, 1, 1);
+ ctx.rect(NaN, 50, 1, 1);
+ ctx.rect(0, Infinity, 1, 1);
+ ctx.rect(0, -Infinity, 1, 1);
+ ctx.rect(0, NaN, 1, 1);
+ ctx.rect(0, 50, Infinity, 1);
+ ctx.rect(0, 50, -Infinity, 1);
+ ctx.rect(0, 50, NaN, 1);
+ ctx.rect(0, 50, 1, Infinity);
+ ctx.rect(0, 50, 1, -Infinity);
+ ctx.rect(0, 50, 1, NaN);
+ ctx.rect(Infinity, Infinity, 1, 1);
+ ctx.rect(Infinity, Infinity, Infinity, 1);
+ ctx.rect(Infinity, Infinity, Infinity, Infinity);
+ ctx.rect(Infinity, Infinity, 1, Infinity);
+ ctx.rect(Infinity, 50, Infinity, 1);
+ ctx.rect(Infinity, 50, Infinity, Infinity);
+ ctx.rect(Infinity, 50, 1, Infinity);
+ ctx.rect(0, Infinity, Infinity, 1);
+ ctx.rect(0, Infinity, Infinity, Infinity);
+ ctx.rect(0, Infinity, 1, Infinity);
+ ctx.rect(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html
index e7c73dfaffb..8ebbf0c1f5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.selfintersect.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.rect(45, 20, 10, 10);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.rect(45, 20, 10, 10);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.winding.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.winding.html
index c9547fe32aa..d7350ef38c7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.winding.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.rect(0, 0, 50, 50);
-ctx.rect(100, 50, -50, -50);
-ctx.rect(0, 25, 100, -25);
-ctx.rect(100, 25, -100, 25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.rect(0, 0, 50, 50);
+ ctx.rect(100, 50, -50, -50);
+ ctx.rect(0, 25, 100, -25);
+ ctx.rect(100, 25, -100, 25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html
index 9a210e74414..c773ef61d05 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.1.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(0, 50, 100, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(0, 50, 100, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html
index 0e3a7c87d66..5888231fc6d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.2.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, -100, 0, 250);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, -100, 0, 250);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html
index e92b121f312..c000b008fb8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.3.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html
index 086ef94f292..bb3ecb3aa56 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.4.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.rect(100, 25, 0, 0);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.rect(100, 25, 0, 0);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html
index 880cab56140..081c753d919 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.5.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.rect(100, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.rect(100, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html
index 34c9d15cfed..dafb273d562 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.rect.zero.6.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.rect(100, 25, 1000, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.rect(100, 25, 1000, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html
index bdcf60d44cc..3bb890ae969 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.html
@@ -19,36 +19,35 @@
var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html
index 6e13276c987..96e933870ba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html
@@ -19,36 +19,35 @@
var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20));
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20));
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html
index 6186d98eafa..1315233d79b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.html
@@ -19,36 +19,35 @@
var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html
index 7bf91ffe35c..f5c6d009591 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html
@@ -19,36 +19,35 @@
var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20});
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20});
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html
index 250bf7d6ab5..402631a7a00 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html
index e5e953de74b..ed4887c2deb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.1.radius.double.single.argument.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, 20);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, 20);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
index 699603b4fdb..00a9c145824 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
index 55c06ca2ebb..e9b3a7bf798 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html
index 1d38197baff..a2f02104e27 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.1.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
index 701109d4f2e..57df30d5ae0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
index 409d5014c31..5942ab750fe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html
index a0c458f006d..2390a61dfd8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.2.radii.2.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
index ac4a3ddd894..f4fa76afac3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
index bdfba5df419..4e7dc947f43 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html
index 3e8931e7fc0..d7888da6d9a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.1.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
index 7546120a699..38a8baac539 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
index d8c805c28b6..5e867caf428 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
@@ -19,28 +19,27 @@
var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html
index c3d722bac4e..41edff205cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.2.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
index 1d61ce57059..6d6a1a6ae05 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
index f1714a84e32..132420e3432 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html
index f3f5721a729..75a8e924ff4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.3.radii.3.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
index 4ecff46aeec..b681b59f4e2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
index e5b1feed32f..e5542894b36 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html
index 7c22f2457cb..028effa82b1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.1.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
index f897a721cf7..d3c16eb4936 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
index 826befa02a5..ab5ad3f4da9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html
index a0db8fa25e3..ec229e396a8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.2.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
index ac4f0795c68..5367543fa3d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
index b902fb9fce2..89df524d53a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html
index d69e2da221d..22ba747b377 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.3.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
index f660fdaa648..b15c2918840 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
index 0764d3e0014..d9b03a1225b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
@@ -19,23 +19,22 @@
var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html
index 7a2cd952e60..62ccf859582 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.4.radii.4.double.html
@@ -19,16 +19,15 @@
var t = async_test("Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html
index d18e99b4ed1..39e1d0c6554 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.badinput.html
@@ -19,15 +19,14 @@
var t = async_test("roundRect() throws or does not throw errors given the strange inputs.");
_addTest(function(canvas, ctx) {
-ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit
-ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0
-ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit »
-ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit »
-ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit »
-assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, 0n); });
-assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, { x: 0n }); });
-assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); });
-
+ ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit
+ ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0
+ ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit »
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, 0n); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, { x: 0n }); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html
index 40756e5d941..89aeb3b865c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.closed.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.roundRect(100, 50, 100, 100, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.roundRect(100, 50, 100, 100, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html
index 10ab8c1fb83..be98ce5841b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.1.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(200, 100, 400, 1000, [0]);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(200, 100, 400, 1000, [0]);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html
index 3b95d1ca88e..16131ad345a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.2.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.roundRect(150, 150, 2000, 2000, [0]);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.roundRect(150, 150, 2000, 2000, [0]);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html
index 48fc4988aa8..f9454080eb0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.3.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
-ctx.lineTo(-1, -1);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
+ ctx.lineTo(-1, -1);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html
index 4b70fbc344a..52d49c32e73 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.end.4.html
@@ -19,18 +19,17 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
-ctx.lineTo(-150, -150);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
+ ctx.lineTo(-150, -150);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html
index 81ffe8c93e4..66e1172432a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.negative.html
@@ -19,26 +19,25 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
-ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
-ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
-ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
-ctx.fill();
-// All rects drawn
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-// Correct corners are rounded.
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
+ ctx.fill();
+ // All rects drawn
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ // Correct corners are rounded.
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html
index 892ef6e5f19..df3990a3767 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.newsubpath.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.roundRect(200, 25, 1, 1, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.roundRect(200, 25, 1, 1, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html
index a047b73177f..5f0f0b6eafa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.nonfinite.html
@@ -19,97 +19,96 @@
var t = async_test("roundRect() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.roundRect(Infinity, 50, 1, 1, [0]);
-ctx.roundRect(-Infinity, 50, 1, 1, [0]);
-ctx.roundRect(NaN, 50, 1, 1, [0]);
-ctx.roundRect(0, Infinity, 1, 1, [0]);
-ctx.roundRect(0, -Infinity, 1, 1, [0]);
-ctx.roundRect(0, NaN, 1, 1, [0]);
-ctx.roundRect(0, 50, Infinity, 1, [0]);
-ctx.roundRect(0, 50, -Infinity, 1, [0]);
-ctx.roundRect(0, 50, NaN, 1, [0]);
-ctx.roundRect(0, 50, 1, Infinity, [0]);
-ctx.roundRect(0, 50, 1, -Infinity, [0]);
-ctx.roundRect(0, 50, 1, NaN, [0]);
-ctx.roundRect(0, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(0, Infinity, 1, Infinity, [0]);
-ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, Infinity, Infinity, [0]);
-ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
-ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.roundRect(Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(-Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(NaN, 50, 1, 1, [0]);
+ ctx.roundRect(0, Infinity, 1, 1, [0]);
+ ctx.roundRect(0, -Infinity, 1, 1, [0]);
+ ctx.roundRect(0, NaN, 1, 1, [0]);
+ ctx.roundRect(0, 50, Infinity, 1, [0]);
+ ctx.roundRect(0, 50, -Infinity, 1, [0]);
+ ctx.roundRect(0, 50, NaN, 1, [0]);
+ ctx.roundRect(0, 50, 1, Infinity, [0]);
+ ctx.roundRect(0, 50, 1, -Infinity, [0]);
+ ctx.roundRect(0, 50, 1, NaN, [0]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html
index e7675ba35c3..913b17e45e9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.1.html
@@ -19,21 +19,20 @@
var t = async_test("Check that roundRects with intersecting corner arcs are rendered correctly.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html
index 48140ca60ed..abd7f860880 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.intersecting.2.html
@@ -19,21 +19,20 @@
var t = async_test("Check that roundRects with intersecting corner arcs are rendered correctly.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html
index c7c0bda6ff7..ac2532dcfeb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.negative.html
@@ -19,13 +19,12 @@
var t = async_test("roundRect() with negative radius throws an exception");
_addTest(function(canvas, ctx) {
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
-
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html
index e45b20b7a07..cfaf87ecf22 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.noargument.html
@@ -19,31 +19,30 @@
var t = async_test("Check that roundRect draws a rectangle when no radii are provided.");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(10, 10, 80, 30);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-// upper left corner (10, 10)
-_assertPixel(canvas, 10,9, 255,0,0,255);
-_assertPixel(canvas, 9,10, 255,0,0,255);
-_assertPixel(canvas, 10,10, 0,255,0,255);
-
-// upper right corner (89, 10)
-_assertPixel(canvas, 90,10, 255,0,0,255);
-_assertPixel(canvas, 89,9, 255,0,0,255);
-_assertPixel(canvas, 89,10, 0,255,0,255);
-
-// lower right corner (89, 39)
-_assertPixel(canvas, 89,40, 255,0,0,255);
-_assertPixel(canvas, 90,39, 255,0,0,255);
-_assertPixel(canvas, 89,39, 0,255,0,255);
-
-// lower left corner (10, 30)
-_assertPixel(canvas, 9,39, 255,0,0,255);
-_assertPixel(canvas, 10,40, 255,0,0,255);
-_assertPixel(canvas, 10,39, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(10, 10, 80, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ // upper left corner (10, 10)
+ _assertPixel(canvas, 10,9, 255,0,0,255);
+ _assertPixel(canvas, 9,10, 255,0,0,255);
+ _assertPixel(canvas, 10,10, 0,255,0,255);
+
+ // upper right corner (89, 10)
+ _assertPixel(canvas, 90,10, 255,0,0,255);
+ _assertPixel(canvas, 89,9, 255,0,0,255);
+ _assertPixel(canvas, 89,10, 0,255,0,255);
+
+ // lower right corner (89, 39)
+ _assertPixel(canvas, 89,40, 255,0,0,255);
+ _assertPixel(canvas, 90,39, 255,0,0,255);
+ _assertPixel(canvas, 89,39, 0,255,0,255);
+
+ // lower left corner (10, 30)
+ _assertPixel(canvas, 9,39, 255,0,0,255);
+ _assertPixel(canvas, 10,40, 255,0,0,255);
+ _assertPixel(canvas, 10,39, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html
index 16a03c1fdc5..8363285ffc2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.none.html
@@ -19,8 +19,7 @@
var t = async_test("Check that roundRect throws an RangeError if radii is an empty array.");
_addTest(function(canvas, ctx) {
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
-
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html
index c6a960b0590..d8fe4bb45cc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.radius.toomany.html
@@ -19,8 +19,7 @@
var t = async_test("Check that roundRect throws an IndeSizeError if radii has more than four items.");
_addTest(function(canvas, ctx) {
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
-
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html
index d644d66e7ca..7a69aaf4c60 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.selfintersect.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 100, 50, [0]);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.roundRect(45, 20, 10, 10, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 100, 50, [0]);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.roundRect(45, 20, 10, 10, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html
index 6bcad2c9642..9c1f985eb92 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.winding.html
@@ -19,20 +19,19 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 50, 50, [0]);
-ctx.roundRect(100, 50, -50, -50, [0]);
-ctx.roundRect(0, 25, 100, -25, [0]);
-ctx.roundRect(100, 25, -100, 25, [0]);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 50, 50, [0]);
+ ctx.roundRect(100, 50, -50, -50, [0]);
+ ctx.roundRect(0, 25, 100, -25, [0]);
+ ctx.roundRect(100, 25, -100, 25, [0]);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html
index 690087f0aa0..4e9a804dc23 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.1.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(0, 50, 100, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(0, 50, 100, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html
index cfeb923299a..ac64fa7818c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.2.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, -100, 0, 250, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, -100, 0, 250, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html
index 39151f38c76..a807715b352 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.3.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html
index 20dccbeaa0b..fc51918c27d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.4.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html
index bcb84a59171..de7d41b68fa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.5.html
@@ -19,15 +19,14 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html
index 829503767dc..1e8e338a739 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.roundrect.zero.6.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.roundRect(100, 25, 1000, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.roundRect(100, 25, 1000, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.empty.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.empty.html
index 5a2a91bd0fe..aa459ec9869 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.empty.html
@@ -19,21 +19,20 @@
var t = async_test("Empty subpaths are not stroked");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(40, 25);
-ctx.moveTo(60, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.beginPath();
+ ctx.moveTo(40, 25);
+ ctx.moveTo(60, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html
index c1b425d18c7..a577f227697 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.overlap.html
@@ -19,19 +19,18 @@
var t = async_test("Stroked subpaths are combined before being drawn");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 20);
-ctx.lineTo(100, 20);
-ctx.moveTo(0, 30);
-ctx.lineTo(100, 30);
-ctx.stroke();
-
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
-
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 20);
+ ctx.lineTo(100, 20);
+ ctx.moveTo(0, 30);
+ ctx.lineTo(100, 30);
+ ctx.stroke();
+
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html
index abef923f6a6..6474a15424c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.arc.html
@@ -19,26 +19,25 @@
var t = async_test("Zero-length line segments from arcTo and arc are removed before stroking");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 150, 25, 10);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 150, 25, 10);
+ ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(60, 25);
-ctx.arc(50, 25, 10, 0, 0, false);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.beginPath();
+ ctx.moveTo(60, 25);
+ ctx.arc(50, 25, 10, 0, 0, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html
index 4515669bc8e..16b46852a1b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.closed.html
@@ -19,22 +19,21 @@
var t = async_test("Zero-length line segments from closed paths are removed before stroking");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.closePath();
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html
index 532c7465950..226fccc6d4b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.corner.html
@@ -19,24 +19,23 @@
var t = async_test("Zero-length line segments are removed before stroking with miters");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.4;
-
-ctx.beginPath();
-ctx.moveTo(-1000, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 1000);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.4;
+
+ ctx.beginPath();
+ ctx.moveTo(-1000, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html
index 6055d8b3f4c..8023b7b3f93 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.curve.html
@@ -19,26 +19,25 @@
var t = async_test("Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed before stroking");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.quadraticCurveTo(50, 25, 50, 25);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.quadraticCurveTo(50, 25, 50, 25);
+ ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html
index 2d8dcbe4995..97f88847c0b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.line.html
@@ -19,21 +19,20 @@
var t = async_test("Zero-length line segments from lineTo are removed before stroking");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html
index 28b02ca3255..bf1fc9aa207 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.prune.rect.html
@@ -19,22 +19,21 @@
var t = async_test("Zero-length line segments from rect and strokeRect are removed before stroking");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
-ctx.strokeRect(50, 25, 0, 0);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html
index 29ccc6613da..3e4651ec4a1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale1.html
@@ -19,35 +19,34 @@
var t = async_test("Stroke line widths are scaled by the current transformation matrix");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html
index bc72c5c140f..099efec76c4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.scale2.html
@@ -19,37 +19,36 @@
var t = async_test("Stroke line widths are scaled by the current transformation matrix");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.skew.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.skew.html
index b902a1dc275..86f3eebf1d5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.skew.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.skew.html
@@ -19,51 +19,50 @@
var t = async_test("Strokes lines are skewed by the current transformation matrix");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.save();
-ctx.beginPath();
-ctx.moveTo(49, -50);
-ctx.lineTo(201, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 283);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
+ ctx.save();
+ ctx.beginPath();
+ ctx.moveTo(49, -50);
+ ctx.lineTo(201, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 283);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html
index 9b05a6aa0db..8e6b41946fb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.unaffected.html
@@ -19,23 +19,22 @@
var t = async_test("Stroking does not start a new path or subpath");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-
-ctx.closePath();
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+
+ ctx.closePath();
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.union.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.union.html
index daa8da93493..73198ab24d1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.union.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.stroke.union.html
@@ -19,19 +19,18 @@
var t = async_test("Strokes in opposite directions are unioned, not subtracted");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 40;
-ctx.moveTo(0, 10);
-ctx.lineTo(100, 10);
-ctx.moveTo(100, 40);
-ctx.lineTo(0, 40);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 40;
+ ctx.moveTo(0, 10);
+ ctx.lineTo(100, 10);
+ ctx.moveTo(100, 40);
+ ctx.lineTo(0, 40);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.basic.html
index d77b66a68fc..1cdc81e4f65 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.basic.html
@@ -19,17 +19,16 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(-100, 0);
-ctx.rect(100, 0, 100, 50);
-ctx.translate(0, -100);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.translate(-100, 0);
+ ctx.rect(100, 0, 100, 50);
+ ctx.translate(0, -100);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.changing.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.changing.html
index 5f79285a81d..8f711b6b9ae 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.changing.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.changing.html
@@ -19,23 +19,22 @@
var t = async_test("Transformations are applied while building paths, not when drawing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.translate(100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(0, 50);
-ctx.lineTo(0, 0);
-ctx.translate(-100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(1000, 1000);
-ctx.rotate(Math.PI/2);
-ctx.scale(0.1, 0.1);
-ctx.fill();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.translate(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.translate(-100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(1000, 1000);
+ ctx.rotate(Math.PI/2);
+ ctx.scale(0.1, 0.1);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html
index aafa11c127b..af06c063713 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/path-objects/2d.path.transformation.multiple.html
@@ -19,28 +19,27 @@
var t = async_test("Transformations are applied while building paths, not when drawing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.fillStyle = '#f00';
-ctx.translate(-100, 0);
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-ctx.translate(100, 0);
-ctx.fill();
-
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.translate(0, -50);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-ctx.translate(0, 50);
-ctx.stroke();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.translate(-100, 0);
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ ctx.translate(100, 0);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.translate(0, -50);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ ctx.translate(0, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html
index 49d029267cf..1ecd3fbd655 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create.and.resize.html
@@ -19,15 +19,14 @@
var t = async_test("Verify no crash when resizing an image bitmap to zero.");
_addTest(function(canvas, ctx) {
-var image = new Image();
-image.onload = t.step_func(function() {
- var options = { resizeHeight: 0 };
- var p1 = createImageBitmap(image, options);
- p1.catch(function(error){});
- t.done();
-});
-image.src = 'red.png';
-
+ var image = new Image();
+ image.onload = t.step_func(function() {
+ var options = { resizeHeight: 0 };
+ var p1 = createImageBitmap(image, options);
+ p1.catch(function(error){});
+ t.done();
+ });
+ image.src = 'red.png';
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html
index aa1ca36182e..1ea73690e89 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.basic.html
@@ -19,8 +19,7 @@
var t = async_test("createImageData(imgdata) exists and returns something");
_addTest(function(canvas, ctx) {
-_assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
-
+ _assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html
index 1d8ffbf0000..8709623a0c8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.initial.html
@@ -19,19 +19,18 @@
var t = async_test("createImageData(imgdata) returns transparent black data of the right size");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(0, 0, 10, 20);
-var imgdata2 = ctx.createImageData(imgdata1);
-_assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
-_assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
-_assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata2.data.length; ++i)
- if (imgdata2.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata1 = ctx.getImageData(0, 0, 10, 20);
+ var imgdata2 = ctx.createImageData(imgdata1);
+ _assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
+ _assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
+ _assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata2.data.length; ++i)
+ if (imgdata2.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html
index c98aab3ff44..dd4b80ec083 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.this.html
@@ -19,11 +19,10 @@
var t = async_test("createImageData(imgdata) should throw when called with the wrong |this|");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.createImageData(1, 1);
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(null, imgdata); });
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(undefined, imgdata); });
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call({}, imgdata); });
-
+ var imgdata = ctx.createImageData(1, 1);
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(null, imgdata); });
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(undefined, imgdata); });
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call({}, imgdata); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html
index f339dde2364..36f3db99be3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.type.html
@@ -19,14 +19,13 @@
var t = async_test("createImageData(imgdata) returns an ImageData object containing a Uint8ClampedArray object");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
-window.ImageData.prototype.thisImplementsImageData = true;
-window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
-var imgdata = ctx.createImageData(ctx.createImageData(1, 1));
-_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
-_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
-
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+ _assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+ window.ImageData.prototype.thisImplementsImageData = true;
+ window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+ var imgdata = ctx.createImageData(ctx.createImageData(1, 1));
+ _assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+ _assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html
index 06447cb6907..02619376a1b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create1.zero.html
@@ -19,8 +19,7 @@
var t = async_test("createImageData(null) throws TypeError");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.createImageData(null); });
-
+ assert_throws_js(TypeError, function() { ctx.createImageData(null); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html
index 017d9cfe286..807b6dbfa21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.basic.html
@@ -19,8 +19,7 @@
var t = async_test("createImageData(sw, sh) exists and returns something");
_addTest(function(canvas, ctx) {
-_assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
-
+ _assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html
index 57b912bc7fe..31aa42d5a89 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.double.html
@@ -19,13 +19,12 @@
var t = async_test("createImageData(w, h) double is converted to long");
_addTest(function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.createImageData(-10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.createImageData(-10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html
index 57cb7ce926f..c2a69b4c06c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.initial.html
@@ -19,16 +19,15 @@
var t = async_test("createImageData(sw, sh) returns transparent black data of the right size");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.createImageData(10, 20);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; ++i)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-
+ var imgdata = ctx.createImageData(10, 20);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; ++i)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html
index 8daa111db53..73b2a1c19f2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.large.html
@@ -19,16 +19,15 @@
var t = async_test("createImageData(sw, sh) works for sizes much larger than the canvas");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.createImageData(1000, 2000);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-
+ var imgdata = ctx.createImageData(1000, 2000);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html
index 87c0ca26d07..7c4a3944eb0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.negative.html
@@ -19,14 +19,13 @@
var t = async_test("createImageData(sw, sh) takes the absolute magnitude of the size arguments");
_addTest(function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10, 20);
-var imgdata2 = ctx.createImageData(-10, 20);
-var imgdata3 = ctx.createImageData(10, -20);
-var imgdata4 = ctx.createImageData(-10, -20);
-_assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
-_assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
-_assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
-
+ var imgdata1 = ctx.createImageData(10, 20);
+ var imgdata2 = ctx.createImageData(-10, 20);
+ var imgdata3 = ctx.createImageData(10, -20);
+ var imgdata4 = ctx.createImageData(-10, -20);
+ _assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
+ _assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
+ _assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html
index 55fcb761fca..af30dc9124b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.nonfinite.html
@@ -19,24 +19,23 @@
var t = async_test("createImageData() throws TypeError if arguments are not finite");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
-
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html
index 045cd0610ca..c62243f4185 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.round.html
@@ -19,11 +19,10 @@
var t = async_test("createImageData(w, h) is rounded the same as getImageData(0, 0, w, h)");
_addTest(function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
-_assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
-_assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
-
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
+ _assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
+ _assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html
index 1937609c878..f5373d0eddd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.this.html
@@ -19,10 +19,9 @@
var t = async_test("createImageData(sw, sh) should throw when called with the wrong |this|");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(null, 1, 1); });
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(undefined, 1, 1); });
-assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call({}, 1, 1); });
-
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(null, 1, 1); });
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call(undefined, 1, 1); });
+ assert_throws_js(TypeError, function() { CanvasRenderingContext2D.prototype.createImageData.call({}, 1, 1); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html
index 2ca1706f7f7..d595d338458 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.type.html
@@ -19,14 +19,13 @@
var t = async_test("createImageData(sw, sh) returns an ImageData object containing a Uint8ClampedArray object");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
-window.ImageData.prototype.thisImplementsImageData = true;
-window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
-var imgdata = ctx.createImageData(1, 1);
-_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
-_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
-
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+ _assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+ window.ImageData.prototype.thisImplementsImageData = true;
+ window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+ var imgdata = ctx.createImageData(1, 1);
+ _assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+ _assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html
index c23ca70eaf0..cc949162d3b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.create2.zero.html
@@ -19,12 +19,11 @@
var t = async_test("createImageData(sw, sh) throws INDEX_SIZE_ERR if size is zero");
_addTest(function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
-
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html
index a4762aca953..5f8f1995401 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.basic.html
@@ -19,8 +19,7 @@
var t = async_test("getImageData() exists and returns something");
_addTest(function(canvas, ctx) {
-_assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
-
+ _assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html
index 3c0b1750a51..0047e910b78 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.clamp.html
@@ -19,19 +19,18 @@
var t = async_test("getImageData() clamps colors to the range [0, 255]");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = 'rgb(-100, -200, -300)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgb(256, 300, 400)';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
-
+ ctx.fillStyle = 'rgb(-100, -200, -300)';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = 'rgb(256, 300, 400)';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html
index 9ff3e9a132b..5cea5fcbc23 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.double.html
@@ -19,13 +19,12 @@
var t = async_test("createImageData(w, h) double is converted to long");
_addTest(function(canvas, ctx) {
-var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-
+ var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html
index dd6cc755784..689e72f69bc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.invalid.html
@@ -19,26 +19,25 @@
var t = async_test("Verify getImageData() behavior in invalid cases.");
_addTest(function(canvas, ctx) {
-imageData = ctx.getImageData(0,0,2,2);
-var testValues = [NaN, true, false, "\"garbage\"", "-1",
- "0", "1", "2", Infinity, -Infinity,
- -5, -0.5, 0, 0.5, 5,
- 5.4, 255, 256, null, undefined];
-var testResults = [0, 1, 0, 0, 0,
- 0, 1, 2, 255, 0,
- 0, 0, 0, 0, 5,
- 5, 255, 255, 0, 0];
-for (var i = 0; i < testValues.length; i++) {
- imageData.data[0] = testValues[i];
- _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
-}
-imageData.data['foo']='garbage';
-_assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
-imageData.data[-1]='garbage';
-_assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
-imageData.data[17]='garbage';
-_assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
-
+ imageData = ctx.getImageData(0,0,2,2);
+ var testValues = [NaN, true, false, "\"garbage\"", "-1",
+ "0", "1", "2", Infinity, -Infinity,
+ -5, -0.5, 0, 0.5, 5,
+ 5.4, 255, 256, null, undefined];
+ var testResults = [0, 1, 0, 0, 0,
+ 0, 1, 2, 255, 0,
+ 0, 0, 0, 0, 5,
+ 5, 255, 255, 0, 0];
+ for (var i = 0; i < testValues.length; i++) {
+ imageData.data[0] = testValues[i];
+ _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
+ }
+ imageData.data['foo']='garbage';
+ _assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
+ imageData.data[-1]='garbage';
+ _assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
+ imageData.data[17]='garbage';
+ _assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html
index cb8e6064004..f41eec7b9bb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.large.crash.html
@@ -19,8 +19,7 @@
var t = async_test("Test that canvas crash when image data cannot be allocated.");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
-
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html
index be99e1e5255..41b9832025f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.length.html
@@ -19,9 +19,8 @@
var t = async_test("getImageData() returns a correctly-sized Uint8ClampedArray");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html
index a5884606d7b..a80e905cfd3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonfinite.html
@@ -19,56 +19,55 @@
var t = async_test("getImageData() throws TypeError if arguments are not finite");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
-
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html
index 6c8599846c6..bc833c2198f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.nonpremul.html
@@ -19,15 +19,14 @@
var t = async_test("getImageData() returns non-premultiplied colors");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(10, 10, 10, 10);
-_assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
-_assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
-_assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(10, 10, 10, 10);
+ _assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
+ _assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
+ _assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html
index 6b368aa7d4c..e5b57f650e2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.alpha.html
@@ -19,12 +19,11 @@
var t = async_test("getImageData() returns A in the fourth component");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-
+ ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html
index 23ff82c0550..66fd984ebd8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.cols.html
@@ -19,15 +19,14 @@
var t = async_test("getImageData() returns leftmost columns first");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 2, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
-_assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
-
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 2, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
+ _assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html
index db297dd55c7..4d15ce79277 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rgb.html
@@ -19,18 +19,17 @@
var t = async_test("getImageData() returns R then G then B");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#48c';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
-_assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
-_assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
-_assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
-_assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
-_assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
-_assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
-
+ ctx.fillStyle = '#48c';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
+ _assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
+ _assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
+ _assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
+ _assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
+ _assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
+ _assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html
index 332bc053027..086ce322e04 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.order.rows.html
@@ -19,15 +19,14 @@
var t = async_test("getImageData() returns topmost rows first");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 2);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
-_assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
-
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 2);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
+ _assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html
index f5dfa6bb8ae..d9211917729 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.range.html
@@ -19,15 +19,14 @@
var t = async_test("getImageData() returns values in the range [0, 255]");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html
index 7b9ab46fab0..9255be087b6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.rounding.html
@@ -19,26 +19,25 @@
var t = async_test("Test the handling of non-integer source coordinates in getImageData().");
_addTest(function(canvas, ctx) {
-function testDimensions(sx, sy, sw, sh, width, height)
-{
- imageData = ctx.getImageData(sx, sy, sw, sh);
- _assert(imageData.width == width, "imageData.width == width");
- _assert(imageData.height == height, "imageData.height == height");
-}
+ function testDimensions(sx, sy, sw, sh, width, height)
+ {
+ imageData = ctx.getImageData(sx, sy, sw, sh);
+ _assert(imageData.width == width, "imageData.width == width");
+ _assert(imageData.height == height, "imageData.height == height");
+ }
-testDimensions(0, 0, 20, 10, 20, 10);
+ testDimensions(0, 0, 20, 10, 20, 10);
-testDimensions(.1, .2, 20, 10, 20, 10);
-testDimensions(.9, .8, 20, 10, 20, 10);
+ testDimensions(.1, .2, 20, 10, 20, 10);
+ testDimensions(.9, .8, 20, 10, 20, 10);
-testDimensions(0, 0, 20.9, 10.9, 20, 10);
-testDimensions(0, 0, 20.1, 10.1, 20, 10);
+ testDimensions(0, 0, 20.9, 10.9, 20, 10);
+ testDimensions(0, 0, 20.1, 10.1, 20, 10);
-testDimensions(-1, -1, 20, 10, 20, 10);
-
-testDimensions(-1.1, 0, 20, 10, 20, 10);
-testDimensions(-1.9, 0, 20, 10, 20, 10);
+ testDimensions(-1, -1, 20, 10, 20, 10);
+ testDimensions(-1.1, 0, 20, 10, 20, 10);
+ testDimensions(-1.9, 0, 20, 10, 20, 10);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html
index 7e705896f2e..0b84b1cacac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.negative.html
@@ -19,27 +19,26 @@
var t = async_test("getImageData() works with negative width and height, and returns top-to-bottom left-to-right");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
-
-var imgdata1 = ctx.getImageData(85, 25, -10, -10);
-_assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
-
-var imgdata2 = ctx.getImageData(0, 0, -1, -1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
+
+ var imgdata1 = ctx.getImageData(85, 25, -10, -10);
+ _assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
+
+ var imgdata2 = ctx.getImageData(0, 0, -1, -1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html
index ccc75a2e01f..fca97f2e6f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.outside.html
@@ -19,67 +19,66 @@
var t = async_test("getImageData() returns transparent black outside the canvas");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#08f';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#08f';
+ ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
+ var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
-var imgdata2 = ctx.getImageData(10, -5, 1, 1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(10, -5, 1, 1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-var imgdata3 = ctx.getImageData(200, 5, 1, 1);
-_assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
+ var imgdata3 = ctx.getImageData(200, 5, 1, 1);
+ _assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
-var imgdata4 = ctx.getImageData(10, 60, 1, 1);
-_assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
+ var imgdata4 = ctx.getImageData(10, 60, 1, 1);
+ _assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
-var imgdata5 = ctx.getImageData(100, 10, 1, 1);
-_assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
+ var imgdata5 = ctx.getImageData(100, 10, 1, 1);
+ _assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
-var imgdata6 = ctx.getImageData(0, 10, 1, 1);
-_assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
-_assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
-
-var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
-_assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
-_assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
-_assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
-_assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
-_assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
-_assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
-_assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
-_assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
-_assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
-_assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
-_assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
-_assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
-_assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
-_assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
-_assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
-_assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
-_assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
-_assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
-_assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
-_assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
+ var imgdata6 = ctx.getImageData(0, 10, 1, 1);
+ _assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
+ _assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
+ var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
+ _assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
+ _assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
+ _assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
+ _assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
+ _assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
+ _assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
+ _assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
+ _assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
+ _assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
+ _assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
+ _assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
+ _assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
+ _assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
+ _assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
+ _assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
+ _assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
+ _assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
+ _assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
+ _assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
+ _assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html
index 418b2e3e394..800edb8baf5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.source.size.html
@@ -19,11 +19,10 @@
var t = async_test("getImageData() returns bigger ImageData for bigger source rectangle");
_addTest(function(canvas, ctx) {
-var imgdata1 = ctx.getImageData(0, 0, 10, 10);
-var imgdata2 = ctx.getImageData(0, 0, 20, 20);
-_assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
-_assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
-
+ var imgdata1 = ctx.getImageData(0, 0, 10, 10);
+ var imgdata2 = ctx.getImageData(0, 0, 20, 20);
+ _assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
+ _assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html
index d030dd409c9..748d46b166b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.type.html
@@ -19,14 +19,13 @@
var t = async_test("getImageData() returns an ImageData object containing a Uint8ClampedArray object");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-_assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
-window.ImageData.prototype.thisImplementsImageData = true;
-window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
-var imgdata = ctx.getImageData(0, 0, 1, 1);
-_assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
-_assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
-
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+ _assertDifferent(window.Uint8ClampedArray, undefined, "window.Uint8ClampedArray", "undefined");
+ window.ImageData.prototype.thisImplementsImageData = true;
+ window.Uint8ClampedArray.prototype.thisImplementsUint8ClampedArray = true;
+ var imgdata = ctx.getImageData(0, 0, 1, 1);
+ _assert(imgdata.thisImplementsImageData, "imgdata.thisImplementsImageData");
+ _assert(imgdata.data.thisImplementsUint8ClampedArray, "imgdata.data.thisImplementsUint8ClampedArray");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html
index 15ad997d5f1..f2f4a2e4fa0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.unaffected.html
@@ -19,23 +19,22 @@
var t = async_test("getImageData() is not affected by context state");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50)
-ctx.save();
-ctx.translate(50, 0);
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.rect(0, 0, 5, 5);
-ctx.clip();
-var imgdata = ctx.getImageData(0, 0, 50, 50);
-ctx.restore();
-ctx.putImageData(imgdata, 50, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50)
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.rect(0, 0, 5, 5);
+ ctx.clip();
+ var imgdata = ctx.getImageData(0, 0, 50, 50);
+ ctx.restore();
+ ctx.putImageData(imgdata, 50, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html
index 3139003dfc7..438bc2fb1e8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.get.zero.html
@@ -19,14 +19,13 @@
var t = async_test("getImageData() throws INDEX_SIZE_ERR if size is zero");
_addTest(function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
-
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html
index e3a17ed6628..df8ef1ba20c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.clamp.html
@@ -19,36 +19,35 @@
var t = async_test("ImageData.data clamps numbers to [0, 255]");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 300;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -100;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 200+Math.pow(2, 32);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -200-Math.pow(2, 32);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = Math.pow(10, 39);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -Math.pow(10, 39);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = -Infinity;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = Infinity;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 300;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -100;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 200+Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -200-Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Infinity;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Infinity;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html
index 7c6e0178fdf..01affeb947f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.bounds.html
@@ -19,15 +19,14 @@
var t = async_test("ImageData has a usable constructor");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-
-assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(0), 1); });
-assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(3), 1); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(4), 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(4), 1, 2); });
-assert_throws_js(TypeError, function() { new ImageData(new Uint8Array(8), 1, 2); });
-assert_throws_js(TypeError, function() { new ImageData(new Int8Array(8), 1, 2); });
-
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+
+ assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(0), 1); });
+ assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(3), 1); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(4), 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(4), 1, 2); });
+ assert_throws_js(TypeError, function() { new ImageData(new Uint8Array(8), 1, 2); });
+ assert_throws_js(TypeError, function() { new ImageData(new Int8Array(8), 1, 2); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html
index 200b7eed934..0cdc025764b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.array.html
@@ -19,14 +19,13 @@
var t = async_test("ImageData has a usable constructor");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-
-var array = new Uint8ClampedArray(8);
-var imgdata = new window.ImageData(array, 1, 2);
-_assertSame(imgdata.width, 1, "imgdata.width", "1");
-_assertSame(imgdata.height, 2, "imgdata.height", "2");
-_assertSame(imgdata.data, array, "imgdata.data", "array");
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+ var array = new Uint8ClampedArray(8);
+ var imgdata = new window.ImageData(array, 1, 2);
+ _assertSame(imgdata.width, 1, "imgdata.width", "1");
+ _assertSame(imgdata.height, 2, "imgdata.height", "2");
+ _assertSame(imgdata.data, array, "imgdata.data", "array");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html
index b01b9da51b8..f7811e7441c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.basics.html
@@ -19,93 +19,92 @@
var t = async_test("Testing different type of ImageData constructor");
_addTest(function(canvas, ctx) {
-function setRGBA(imageData, i, rgba)
-{
- var s = i * 4;
- imageData[s] = rgba[0];
- imageData[s + 1] = rgba[1];
- imageData[s + 2] = rgba[2];
- imageData[s + 3] = rgba[3];
-}
-
-function getRGBA(imageData, i)
-{
- var result = [];
- var s = i * 4;
- for (var j = 0; j < 4; j++) {
- result[j] = imageData[s + j];
- }
- return result;
-}
-
-function assertArrayEquals(actual, expected)
-{
- _assertSame(typeof actual, "object", "typeof actual", "\"object\"");
- _assertDifferent(actual, null, "actual", "null");
- _assertSame("length" in actual, true, "\"length\" in actual", "true");
- _assertSame(actual.length, expected.length, "actual.length", "expected.length");
- for (var i = 0; i < actual.length; i++) {
- _assertSame(actual.hasOwnProperty(i), expected.hasOwnProperty(i), "actual.hasOwnProperty(i)", "expected.hasOwnProperty(i)");
- _assertSame(actual[i], expected[i], "actual[\""+(i)+"\"]", "expected[\""+(i)+"\"]");
- }
-}
-
-_assertDifferent(ImageData, undefined, "ImageData", "undefined");
-imageData = new ImageData(100, 50);
-
-_assertDifferent(imageData, null, "imageData", "null");
-_assertDifferent(imageData.data, null, "imageData.data", "null");
-_assertSame(imageData.width, 100, "imageData.width", "100");
-_assertSame(imageData.height, 50, "imageData.height", "50");
-assertArrayEquals(getRGBA(imageData.data, 4), [0, 0, 0, 0]);
-
-var testColor = [0, 255, 255, 128];
-setRGBA(imageData.data, 4, testColor);
-assertArrayEquals(getRGBA(imageData.data, 4), testColor);
-
-assert_throws_js(TypeError, function() { ImageData(1, 1); });
-assert_throws_js(TypeError, function() { new ImageData(10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData('width', 'height'); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(1 << 31, 1 << 31); });
-assert_throws_js(TypeError, function() { new ImageData(new Uint8ClampedArray(0)); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8Array(100), 25); });
-assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(27), 2); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(28), 7, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(104), 14); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray([12, 34, 168, 65328]), 1, 151); });
-assert_throws_js(TypeError, function() { new ImageData(self, 4, 4); });
-assert_throws_js(TypeError, function() { new ImageData(null, 4, 4); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 13); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 31); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 'biggish'); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 24, 1 << 31); });
-_assertSame(new ImageData(new Uint8ClampedArray(28), 7).height, 1, "new ImageData(new Uint8ClampedArray(28), 7).height", "1");
-
-imageDataFromData = new ImageData(imageData.data, 100);
-_assertSame(imageDataFromData.width, 100, "imageDataFromData.width", "100");
-_assertSame(imageDataFromData.height, 50, "imageDataFromData.height", "50");
-_assertSame(imageDataFromData.data, imageData.data, "imageDataFromData.data", "imageData.data");
-assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
-setRGBA(imageData.data, 10, testColor);
-assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
-
-var data = new Uint8ClampedArray(400);
-data[22] = 129;
-imageDataFromData = new ImageData(data, 20, 5);
-_assertSame(imageDataFromData.width, 20, "imageDataFromData.width", "20");
-_assertSame(imageDataFromData.height, 5, "imageDataFromData.height", "5");
-_assertSame(imageDataFromData.data, data, "imageDataFromData.data", "data");
-assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
-setRGBA(imageDataFromData.data, 2, testColor);
-assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
-
-if (window.SharedArrayBuffer) {
- assert_throws_js(TypeError, function() { new ImageData(new Uint16Array(new SharedArrayBuffer(32)), 4, 2); });
-}
-
+ function setRGBA(imageData, i, rgba)
+ {
+ var s = i * 4;
+ imageData[s] = rgba[0];
+ imageData[s + 1] = rgba[1];
+ imageData[s + 2] = rgba[2];
+ imageData[s + 3] = rgba[3];
+ }
+
+ function getRGBA(imageData, i)
+ {
+ var result = [];
+ var s = i * 4;
+ for (var j = 0; j < 4; j++) {
+ result[j] = imageData[s + j];
+ }
+ return result;
+ }
+
+ function assertArrayEquals(actual, expected)
+ {
+ _assertSame(typeof actual, "object", "typeof actual", "\"object\"");
+ _assertDifferent(actual, null, "actual", "null");
+ _assertSame("length" in actual, true, "\"length\" in actual", "true");
+ _assertSame(actual.length, expected.length, "actual.length", "expected.length");
+ for (var i = 0; i < actual.length; i++) {
+ _assertSame(actual.hasOwnProperty(i), expected.hasOwnProperty(i), "actual.hasOwnProperty(i)", "expected.hasOwnProperty(i)");
+ _assertSame(actual[i], expected[i], "actual[\""+(i)+"\"]", "expected[\""+(i)+"\"]");
+ }
+ }
+
+ _assertDifferent(ImageData, undefined, "ImageData", "undefined");
+ imageData = new ImageData(100, 50);
+
+ _assertDifferent(imageData, null, "imageData", "null");
+ _assertDifferent(imageData.data, null, "imageData.data", "null");
+ _assertSame(imageData.width, 100, "imageData.width", "100");
+ _assertSame(imageData.height, 50, "imageData.height", "50");
+ assertArrayEquals(getRGBA(imageData.data, 4), [0, 0, 0, 0]);
+
+ var testColor = [0, 255, 255, 128];
+ setRGBA(imageData.data, 4, testColor);
+ assertArrayEquals(getRGBA(imageData.data, 4), testColor);
+
+ assert_throws_js(TypeError, function() { ImageData(1, 1); });
+ assert_throws_js(TypeError, function() { new ImageData(10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData('width', 'height'); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(1 << 31, 1 << 31); });
+ assert_throws_js(TypeError, function() { new ImageData(new Uint8ClampedArray(0)); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8Array(100), 25); });
+ assert_throws_dom("INVALID_STATE_ERR", function() { new ImageData(new Uint8ClampedArray(27), 2); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(28), 7, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray(104), 14); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(new Uint8ClampedArray([12, 34, 168, 65328]), 1, 151); });
+ assert_throws_js(TypeError, function() { new ImageData(self, 4, 4); });
+ assert_throws_js(TypeError, function() { new ImageData(null, 4, 4); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 13); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 31); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 'biggish'); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { new ImageData(imageData.data, 1 << 24, 1 << 31); });
+ _assertSame(new ImageData(new Uint8ClampedArray(28), 7).height, 1, "new ImageData(new Uint8ClampedArray(28), 7).height", "1");
+
+ imageDataFromData = new ImageData(imageData.data, 100);
+ _assertSame(imageDataFromData.width, 100, "imageDataFromData.width", "100");
+ _assertSame(imageDataFromData.height, 50, "imageDataFromData.height", "50");
+ _assertSame(imageDataFromData.data, imageData.data, "imageDataFromData.data", "imageData.data");
+ assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
+ setRGBA(imageData.data, 10, testColor);
+ assertArrayEquals(getRGBA(imageDataFromData.data, 10), getRGBA(imageData.data, 10));
+
+ var data = new Uint8ClampedArray(400);
+ data[22] = 129;
+ imageDataFromData = new ImageData(data, 20, 5);
+ _assertSame(imageDataFromData.width, 20, "imageDataFromData.width", "20");
+ _assertSame(imageDataFromData.height, 5, "imageDataFromData.height", "5");
+ _assertSame(imageDataFromData.data, data, "imageDataFromData.data", "data");
+ assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
+ setRGBA(imageDataFromData.data, 2, testColor);
+ assertArrayEquals(getRGBA(imageDataFromData.data, 2), getRGBA(data, 2));
+
+ if (window.SharedArrayBuffer) {
+ assert_throws_js(TypeError, function() { new ImageData(new Uint16Array(new SharedArrayBuffer(32)), 4, 2); });
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html
index e7480501423..a11d8e23400 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.ctor.size.html
@@ -19,16 +19,15 @@
var t = async_test("ImageData has a usable constructor");
_addTest(function(canvas, ctx) {
-_assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
-
-var imgdata = new window.ImageData(2, 3);
-_assertSame(imgdata.width, 2, "imgdata.width", "2");
-_assertSame(imgdata.height, 3, "imgdata.height", "3");
-_assertSame(imgdata.data.length, 2 * 3 * 4, "imgdata.data.length", "2 * 3 * 4");
-for (var i = 0; i < imgdata.data.length; ++i) {
- _assertSame(imgdata.data[i], 0, "imgdata.data[\""+(i)+"\"]", "0");
-}
-
+ _assertDifferent(window.ImageData, undefined, "window.ImageData", "undefined");
+
+ var imgdata = new window.ImageData(2, 3);
+ _assertSame(imgdata.width, 2, "imgdata.width", "2");
+ _assertSame(imgdata.height, 3, "imgdata.height", "3");
+ _assertSame(imgdata.data.length, 2 * 3 * 4, "imgdata.data.length", "2 * 3 * 4");
+ for (var i = 0; i < imgdata.data.length; ++i) {
+ _assertSame(imgdata.data[i], 0, "imgdata.data[\""+(i)+"\"]", "0");
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html
index 496686bbfae..974b5898a31 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.nan.html
@@ -19,14 +19,13 @@
var t = async_test("ImageData.data converts NaN to 0");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = NaN;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = "cheese";
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = NaN;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "cheese";
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html
index ed03fce9832..7eefdb2f554 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.properties.html
@@ -19,11 +19,10 @@
var t = async_test("ImageData objects have the right properties");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
-_assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
-_assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
+ _assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
+ _assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html
index 3b2f7051b1a..f002466bab5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.readonly.html
@@ -19,21 +19,20 @@
var t = async_test("ImageData objects properties are read-only");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-var w = imgdata.width;
-var h = imgdata.height;
-var d = imgdata.data;
-imgdata.width = 123;
-imgdata.height = 123;
-imgdata.data = [100,100,100,100];
-_assertSame(imgdata.width, w, "imgdata.width", "w");
-_assertSame(imgdata.height, h, "imgdata.height", "h");
-_assertSame(imgdata.data, d, "imgdata.data", "d");
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ var w = imgdata.width;
+ var h = imgdata.height;
+ var d = imgdata.data;
+ imgdata.width = 123;
+ imgdata.height = 123;
+ imgdata.data = [100,100,100,100];
+ _assertSame(imgdata.width, w, "imgdata.width", "w");
+ _assertSame(imgdata.height, h, "imgdata.height", "h");
+ _assertSame(imgdata.data, d, "imgdata.data", "d");
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html
index d052930d525..0f7da4fff55 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.round.html
@@ -19,36 +19,35 @@
var t = async_test("ImageData.data rounds numbers with round-to-zero");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 0.499;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.501;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.499;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 1.501;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 2.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 3.5;
-_assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
-imgdata.data[0] = 252.5;
-_assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
-imgdata.data[0] = 253.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 254.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 256.5;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = -0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = -1.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 0.499;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.501;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.499;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 1.501;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 2.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 3.5;
+ _assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
+ imgdata.data[0] = 252.5;
+ _assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
+ imgdata.data[0] = 253.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 254.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 256.5;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = -0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = -1.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html
index 6afa7e87630..3d03bd6769c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.set.html
@@ -19,12 +19,11 @@
var t = async_test("ImageData.data can be modified");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-_assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
-imgdata.data[0] = 200;
-_assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ _assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
+ imgdata.data[0] = 200;
+ _assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html
index d54594a15dc..eda6f2838da 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.string.html
@@ -19,17 +19,16 @@
var t = async_test("ImageData.data converts strings to numbers with ToNumber");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = "110";
-_assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
-imgdata.data[0] = 100;
-imgdata.data[0] = "0x78";
-_assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
-imgdata.data[0] = 100;
-imgdata.data[0] = " +130e0 ";
-_assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "110";
+ _assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "0x78";
+ _assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = " +130e0 ";
+ _assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html
index 3013c886886..96867bec4a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.object.undefined.html
@@ -19,11 +19,10 @@
var t = async_test("ImageData.data converts undefined to 0");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = undefined;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = undefined;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html
index ae8ad977766..6ee38802f62 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.alpha.html
@@ -19,14 +19,13 @@
var t = async_test("putImageData() puts non-solid image data correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
-
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html
index 9a7021fd56a..17f7d3e8e6e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.basic.html
@@ -19,14 +19,13 @@
var t = async_test("putImageData() puts image data from getImageData() onto the canvas");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html
index 229b8129563..948f6170951 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.clip.html
@@ -19,18 +19,17 @@
var t = async_test("putImageData() is not affected by clipping regions");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html
index 3f515b2523e..4db45873a17 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.created.html
@@ -19,18 +19,17 @@
var t = async_test("putImageData() puts image data from createImageData() onto the canvas");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.createImageData(100, 50);
-for (var i = 0; i < imgdata.data.length; i += 4) {
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
- imgdata.data[i+2] = 0;
- imgdata.data[i+3] = 255;
-}
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ var imgdata = ctx.createImageData(100, 50);
+ for (var i = 0; i < imgdata.data.length; i += 4) {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ imgdata.data[i+2] = 0;
+ imgdata.data[i+3] = 255;
+ }
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html
index 282ad03e6d5..10226834a30 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.cross.html
@@ -19,16 +19,15 @@
var t = async_test("putImageData() accepts image data got from a different canvas");
_addTest(function(canvas, ctx) {
-var canvas2 = document.createElement('canvas');
-var ctx2 = canvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50)
-var imgdata = ctx2.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ var canvas2 = document.createElement('canvas');
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50)
+ var imgdata = ctx2.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html
index 81226e6978f..efaa6f25508 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.negative.html
@@ -19,25 +19,24 @@
var t = async_test("putImageData() handles negative-sized dirty rectangles correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html
index 8750c332d60..86a77369f05 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.outside.html
@@ -19,27 +19,26 @@
var t = async_test("putImageData() handles dirty rectangles outside the canvas correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-
-ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
-ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
-ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
-ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+
+ ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
+ ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
+ ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
+ ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html
index 104896d2017..786db5ac4f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect1.html
@@ -19,25 +19,24 @@
var t = async_test("putImageData() only modifies areas inside the dirty rectangle, using width and height");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html
index 7acb2205a35..f5f8a3a0d1e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.rect2.html
@@ -19,25 +19,24 @@
var t = async_test("putImageData() only modifies areas inside the dirty rectangle, using x and y");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(60, 30, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(60, 30, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html
index 336e02a35a2..d3799104dd0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.dirty.zero.html
@@ -19,14 +19,13 @@
var t = async_test("putImageData() with zero-sized dirty rectangle puts nothing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html
index f5f085a0010..70b70a866f0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.modified.html
@@ -19,19 +19,18 @@
var t = async_test("putImageData() puts modified image data correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(45, 20, 10, 10)
-var imgdata = ctx.getImageData(45, 20, 10, 10);
-for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
-{
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
-}
-ctx.putImageData(imgdata, 45, 20);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(45, 20, 10, 10)
+ var imgdata = ctx.getImageData(45, 20, 10, 10);
+ for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
+ {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ }
+ ctx.putImageData(imgdata, 45, 20);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html
index a5c956babad..ab03f9f20fa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.nonfinite.html
@@ -19,90 +19,89 @@
var t = async_test("putImageData() throws TypeError if arguments are not finite");
_addTest(function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
-
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html
index 068c664f0a3..4ed429fe7c7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.null.html
@@ -19,8 +19,7 @@
var t = async_test("putImageData() with null imagedata throws TypeError");
_addTest(function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
-
+ assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html
index b81054d2281..e32d7cc257b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.path.html
@@ -19,15 +19,14 @@
var t = async_test("putImageData() does not affect the current path");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.rect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.putImageData(imgdata, 0, 0);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.rect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.putImageData(imgdata, 0, 0);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html
index 345cb5cbc71..bad06b745f4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unaffected.html
@@ -19,20 +19,19 @@
var t = async_test("putImageData() is not affected by context state");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 1;
-ctx.translate(100, 50);
-ctx.scale(0.1, 0.1);
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 1;
+ ctx.translate(100, 50);
+ ctx.scale(0.1, 0.1);
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html
index cf800bc666a..026e4347ed9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.unchanged.html
@@ -19,25 +19,24 @@
var t = async_test("putImageData(getImageData(...), ...) has no effect");
_addTest(function(canvas, ctx) {
-var i = 0;
-for (var y = 0; y < 16; ++y) {
- for (var x = 0; x < 16; ++x, ++i) {
- ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
- ctx.fillRect(x, y, 1, 1);
- }
-}
-var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-var olddata = [];
-for (var i = 0; i < imgdata1.data.length; ++i)
- olddata[i] = imgdata1.data[i];
-
-ctx.putImageData(imgdata1, 0.1, 0.2);
-
-var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-for (var i = 0; i < imgdata2.data.length; ++i) {
- _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
-}
-
+ var i = 0;
+ for (var y = 0; y < 16; ++y) {
+ for (var x = 0; x < 16; ++x, ++i) {
+ ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
+ ctx.fillRect(x, y, 1, 1);
+ }
+ }
+ var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ var olddata = [];
+ for (var i = 0; i < imgdata1.data.length; ++i)
+ olddata[i] = imgdata1.data[i];
+
+ ctx.putImageData(imgdata1, 0.1, 0.2);
+
+ var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ for (var i = 0; i < imgdata2.data.length; ++i) {
+ _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
+ }
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html
index 88386f028f9..9e43b1fbe90 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/pixel-manipulation/2d.imageData.put.wrongtype.html
@@ -19,11 +19,10 @@
var t = async_test("putImageData() does not accept non-ImageData objects");
_addTest(function(canvas, ctx) {
-var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
-
+ var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/reset/2d.reset.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/reset/2d.reset.basic.html
index 8f63730851d..0753ec6da87 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/reset/2d.reset.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/reset/2d.reset.basic.html
@@ -19,17 +19,16 @@
var t = async_test("reset clears to transparent black");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
-ctx.reset();
-_assertPixel(canvas, 0,0, 0,0,0,0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-_assertPixel(canvas, 25,50, 0,0,0,0);
-_assertPixel(canvas, 100,50, 0,0,0,0);
-_assertPixel(canvas, 0,50, 0,0,0,0);
-_assertPixel(canvas, 100,0, 0,0,0,0);
-t.done();
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, ctx.canvas.width, ctx.canvas.height);
+ ctx.reset();
+ _assertPixel(canvas, 0,0, 0,0,0,0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ _assertPixel(canvas, 25,50, 0,0,0,0);
+ _assertPixel(canvas, 100,50, 0,0,0,0);
+ _assertPixel(canvas, 0,50, 0,0,0,0);
+ _assertPixel(canvas, 100,0, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html
index 8263eb7b808..e4cf8ea9ad2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.basic.html
@@ -19,19 +19,18 @@
var t = async_test("scrollPathIntoView() works");
_addTest(function(canvas, ctx) {
-var div = document.createElement('div');
-div.style.cssText = 'width: 200vw; height: 200vh';
-document.body.appendChild(div);
-canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
-window.scrollTo(0, 0);
-
-ctx.beginPath();
-ctx.rect(4, 8, 16, 32);
-ctx.scrollPathIntoView();
-var rect = canvas.getBoundingClientRect();
-_assertSame(Math.round(rect.top), -8, "Math.round(rect.top)", "-8");
-_assertSame(Math.round(rect.left), 200, "Math.round(rect.left)", "200");
-
+ var div = document.createElement('div');
+ div.style.cssText = 'width: 200vw; height: 200vh';
+ document.body.appendChild(div);
+ canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
+ window.scrollTo(0, 0);
+
+ ctx.beginPath();
+ ctx.rect(4, 8, 16, 32);
+ ctx.scrollPathIntoView();
+ var rect = canvas.getBoundingClientRect();
+ _assertSame(Math.round(rect.top), -8, "Math.round(rect.top)", "-8");
+ _assertSame(Math.round(rect.left), 200, "Math.round(rect.left)", "200");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html
index 16327d52b5c..ee1f833aaf3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.path.html
@@ -19,19 +19,18 @@
var t = async_test("scrollPathIntoView() with path argument works");
_addTest(function(canvas, ctx) {
-var div = document.createElement('div');
-div.style.cssText = 'width: 200vw; height: 200vh';
-document.body.appendChild(div);
-canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
-window.scrollTo(0, 0);
-
-var path = new Path2D();
-path.rect(4, 8, 16, 32);
-ctx.scrollPathIntoView(path);
-var rect = canvas.getBoundingClientRect();
-_assertSame(Math.round(rect.top), -8, "Math.round(rect.top)", "-8");
-_assertSame(Math.round(rect.left), 200, "Math.round(rect.left)", "200");
-
+ var div = document.createElement('div');
+ div.style.cssText = 'width: 200vw; height: 200vh';
+ document.body.appendChild(div);
+ canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
+ window.scrollTo(0, 0);
+
+ var path = new Path2D();
+ path.rect(4, 8, 16, 32);
+ ctx.scrollPathIntoView(path);
+ var rect = canvas.getBoundingClientRect();
+ _assertSame(Math.round(rect.top), -8, "Math.round(rect.top)", "-8");
+ _assertSame(Math.round(rect.left), 200, "Math.round(rect.left)", "200");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html
index 14b1e30ff7d..9d09980b6f0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalLR.html
@@ -19,20 +19,19 @@
var t = async_test("scrollPathIntoView() works in vertical-lr writing mode");
_addTest(function(canvas, ctx) {
-document.documentElement.style.cssText = 'writing-mode: vertical-lr';
-var div = document.createElement('div');
-div.style.cssText = 'width: 200vw; height: 200vh';
-document.body.appendChild(div);
-canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
-window.scrollTo(0, 0);
-
-ctx.beginPath();
-ctx.rect(4, 8, 16, 32);
-ctx.scrollPathIntoView();
-var rect = canvas.getBoundingClientRect();
-_assertSame(Math.round(rect.top), 100, "Math.round(rect.top)", "100");
-_assertSame(Math.round(rect.left), -4, "Math.round(rect.left)", "-4");
-
+ document.documentElement.style.cssText = 'writing-mode: vertical-lr';
+ var div = document.createElement('div');
+ div.style.cssText = 'width: 200vw; height: 200vh';
+ document.body.appendChild(div);
+ canvas.style.cssText = 'position: absolute; top: 100px; left: 200px; border: none;';
+ window.scrollTo(0, 0);
+
+ ctx.beginPath();
+ ctx.rect(4, 8, 16, 32);
+ ctx.scrollPathIntoView();
+ var rect = canvas.getBoundingClientRect();
+ _assertSame(Math.round(rect.top), 100, "Math.round(rect.top)", "100");
+ _assertSame(Math.round(rect.left), -4, "Math.round(rect.left)", "-4");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html
index cf91abe9755..8193106f8e8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/scroll/2d.scrollPathIntoView.verticalRL.html
@@ -19,22 +19,21 @@
var t = async_test("scrollPathIntoView() works in vertical-rl writing mode");
_addTest(function(canvas, ctx) {
-document.documentElement.style.cssText = 'writing-mode: vertical-rl';
-var div = document.createElement('div');
-div.style.cssText = 'width: 200vw; height: 200vh';
-document.body.appendChild(div);
-canvas.style.cssText = 'position: absolute; top: 100px; right: 200px; border: none;';
-window.scrollTo(0, 0);
-
-ctx.beginPath();
-ctx.rect(4, 8, 16, 32);
-ctx.scrollPathIntoView();
-var rect = canvas.getBoundingClientRect();
-var viewportWidth = document.scrollingElement.clientWidth;
-var canvasWidth = canvas.width;
-_assertSame(Math.round(rect.top), 100, "Math.round(rect.top)", "100");
-_assertSame(Math.round(rect.right), viewportWidth + (canvasWidth - 4 - 16), "Math.round(rect.right)", "viewportWidth + (canvasWidth - 4 - 16)");
-
+ document.documentElement.style.cssText = 'writing-mode: vertical-rl';
+ var div = document.createElement('div');
+ div.style.cssText = 'width: 200vw; height: 200vh';
+ document.body.appendChild(div);
+ canvas.style.cssText = 'position: absolute; top: 100px; right: 200px; border: none;';
+ window.scrollTo(0, 0);
+
+ ctx.beginPath();
+ ctx.rect(4, 8, 16, 32);
+ ctx.scrollPathIntoView();
+ var rect = canvas.getBoundingClientRect();
+ var viewportWidth = document.scrollingElement.clientWidth;
+ var canvasWidth = canvas.width;
+ _assertSame(Math.round(rect.top), 100, "Math.round(rect.top)", "100");
+ _assertSame(Math.round(rect.right), viewportWidth + (canvasWidth - 4 - 16), "Math.round(rect.right)", "viewportWidth + (canvasWidth - 4 - 16)");
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.order.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.order.html
index 7fe6dbc133c..6c97bf7426f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.order.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.order.html
@@ -19,15 +19,14 @@
var t = async_test("Transformations are applied in the right order");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(2, 1);
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -50, 50, 50);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.scale(2, 1);
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -50, 50, 50);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html
index 756b5ee6670..0b583cd6785 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.direction.html
@@ -19,14 +19,13 @@
var t = async_test("rotate() is clockwise");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -100, 50, 100);
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -100, 50, 100);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html
index 93839c6427e..3e685fa7a81 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.nonfinite.html
@@ -19,19 +19,18 @@
var t = async_test("rotate() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.rotate(Infinity);
-ctx.rotate(-Infinity);
-ctx.rotate(NaN);
+ ctx.translate(100, 10);
+ ctx.rotate(Infinity);
+ ctx.rotate(-Infinity);
+ ctx.rotate(NaN);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html
index fabf9da24f0..63f895a0de1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.radians.html
@@ -19,14 +19,13 @@
var t = async_test("rotate() uses radians");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html
index 05cb3073ee2..9b923e00084 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrap.html
@@ -19,19 +19,18 @@
var t = async_test("rotate() wraps large positive values correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
-// We need about pi +/- 0.001 in order to get correct-looking results
-// 32-bit floats can store pi*4097 with precision 2^-10, so that should
-// be safe enough on reasonable implementations
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
+ // We need about pi +/- 0.001 in order to get correct-looking results
+ // 32-bit floats can store pi*4097 with precision 2^-10, so that should
+ // be safe enough on reasonable implementations
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html
index 9eae3c5214d..96894ef20e2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.wrapnegative.html
@@ -19,16 +19,15 @@
var t = async_test("rotate() wraps large negative values correctly");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(-Math.PI * (1 + 4096));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.rotate(-Math.PI * (1 + 4096));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html
index 54ad6aa1385..7026ea9d1b1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.rotate.zero.html
@@ -19,14 +19,13 @@
var t = async_test("rotate() by 0 does nothing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.basic.html
index 0573702bd86..7e4b3593b19 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.basic.html
@@ -19,14 +19,13 @@
var t = async_test("scale() works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(2, 4);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 12.5);
-_assertPixel(canvas, 90,40, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 4);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 12.5);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.large.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.large.html
index 65fa9ab8da0..ce7f6d9faef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.large.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.large.html
@@ -19,14 +19,13 @@
var t = async_test("scale() with large scale factors works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(1e5, 1e5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 1, 1);
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1e5, 1e5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 1, 1);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html
index 5bf837ccd76..73bfbc87c18 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.multiple.html
@@ -19,15 +19,14 @@
var t = async_test("Multiple scale()s combine");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.negative.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.negative.html
index e7085999a2b..a5aef69b63b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.negative.html
@@ -19,23 +19,22 @@
var t = async_test("scale() with negative scale factors works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.save();
-ctx.scale(-1, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-50, 0, 50, 50);
-ctx.restore();
-
-ctx.save();
-ctx.scale(1, -1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, -50, 50, 50);
-ctx.restore();
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.scale(-1, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-50, 0, 50, 50);
+ ctx.restore();
+
+ ctx.save();
+ ctx.scale(1, -1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, -50, 50, 50);
+ ctx.restore();
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html
index 59b15490452..c06f96eb222 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.nonfinite.html
@@ -19,23 +19,22 @@
var t = async_test("scale() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.scale(Infinity, 0.1);
-ctx.scale(-Infinity, 0.1);
-ctx.scale(NaN, 0.1);
-ctx.scale(0.1, Infinity);
-ctx.scale(0.1, -Infinity);
-ctx.scale(0.1, NaN);
-ctx.scale(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.scale(Infinity, 0.1);
+ ctx.scale(-Infinity, 0.1);
+ ctx.scale(NaN, 0.1);
+ ctx.scale(0.1, Infinity);
+ ctx.scale(0.1, -Infinity);
+ ctx.scale(0.1, NaN);
+ ctx.scale(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.zero.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.zero.html
index f495ee2e6a0..ae15034a194 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.scale.zero.html
@@ -19,25 +19,24 @@
var t = async_test("scale() with a scale factor of zero works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.save();
-ctx.translate(50, 0);
-ctx.scale(0, 1);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-ctx.save();
-ctx.translate(0, 25);
-ctx.scale(1, 0);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.scale(0, 1);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ ctx.save();
+ ctx.translate(0, 25);
+ ctx.scale(1, 0);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html
index 5fa910a5b11..099831e6383 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.multiple.html
@@ -19,16 +19,15 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.setTransform(1/2,0, 0,1/2, 0,0);
-ctx.setTransform();
-ctx.setTransform(2,0, 0,2, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.setTransform(1/2,0, 0,1/2, 0,0);
+ ctx.setTransform();
+ ctx.setTransform(2,0, 0,2, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html
index fea3799a41f..019493ad162 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.nonfinite.html
@@ -19,91 +19,90 @@
var t = async_test("setTransform() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(NaN, 0, 0, 0, 0, 0);
-ctx.setTransform(0, Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, NaN, 0, 0, 0, 0);
-ctx.setTransform(0, 0, Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, NaN, 0, 0, 0);
-ctx.setTransform(0, 0, 0, Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, NaN, 0, 0);
-ctx.setTransform(0, 0, 0, 0, Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, NaN, 0);
-ctx.setTransform(0, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, NaN);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(NaN, 0, 0, 0, 0, 0);
+ ctx.setTransform(0, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, NaN, 0, 0, 0, 0);
+ ctx.setTransform(0, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, NaN, 0, 0, 0);
+ ctx.setTransform(0, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, NaN, 0, 0);
+ ctx.setTransform(0, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, NaN, 0);
+ ctx.setTransform(0, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, NaN);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html
index e78a07897b5..f6f8655b1ed 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.setTransform.skewed.html
@@ -19,36 +19,35 @@
var t = async_test("");
_addTest(function(canvas, ctx) {
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
-
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.setTransform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
+
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.setTransform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.identity.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.identity.html
index c9742ac210c..be5de19a458 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.identity.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.identity.html
@@ -19,14 +19,13 @@
var t = async_test("transform() with the identity matrix does nothing");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.transform(1,0, 0,1, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.transform(1,0, 0,1, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html
index 04e5adf4c86..1e8e4cccdf5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.multiply.html
@@ -19,15 +19,14 @@
var t = async_test("transform() multiplies the CTM");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.transform(1,2, 3,4, 5,6);
-ctx.transform(-2,1, 3/2,-1/2, 1,-2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.transform(1,2, 3,4, 5,6);
+ ctx.transform(-2,1, 3/2,-1/2, 1,-2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html
index b94da2c3818..d3fae8520ca 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.nonfinite.html
@@ -19,91 +19,90 @@
var t = async_test("transform() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.transform(Infinity, 0, 0, 0, 0, 0);
-ctx.transform(-Infinity, 0, 0, 0, 0, 0);
-ctx.transform(NaN, 0, 0, 0, 0, 0);
-ctx.transform(0, Infinity, 0, 0, 0, 0);
-ctx.transform(0, -Infinity, 0, 0, 0, 0);
-ctx.transform(0, NaN, 0, 0, 0, 0);
-ctx.transform(0, 0, Infinity, 0, 0, 0);
-ctx.transform(0, 0, -Infinity, 0, 0, 0);
-ctx.transform(0, 0, NaN, 0, 0, 0);
-ctx.transform(0, 0, 0, Infinity, 0, 0);
-ctx.transform(0, 0, 0, -Infinity, 0, 0);
-ctx.transform(0, 0, 0, NaN, 0, 0);
-ctx.transform(0, 0, 0, 0, Infinity, 0);
-ctx.transform(0, 0, 0, 0, -Infinity, 0);
-ctx.transform(0, 0, 0, 0, NaN, 0);
-ctx.transform(0, 0, 0, 0, 0, Infinity);
-ctx.transform(0, 0, 0, 0, 0, -Infinity);
-ctx.transform(0, 0, 0, 0, 0, NaN);
-ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, 0, 0, Infinity, 0);
-ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, 0, 0, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, 0, Infinity, 0, Infinity, 0);
-ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, 0, 0, Infinity);
-ctx.transform(0, 0, 0, Infinity, Infinity, 0);
-ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, 0, Infinity, 0, Infinity);
-ctx.transform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.transform(Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(NaN, 0, 0, 0, 0, 0);
+ ctx.transform(0, Infinity, 0, 0, 0, 0);
+ ctx.transform(0, -Infinity, 0, 0, 0, 0);
+ ctx.transform(0, NaN, 0, 0, 0, 0);
+ ctx.transform(0, 0, Infinity, 0, 0, 0);
+ ctx.transform(0, 0, -Infinity, 0, 0, 0);
+ ctx.transform(0, 0, NaN, 0, 0, 0);
+ ctx.transform(0, 0, 0, Infinity, 0, 0);
+ ctx.transform(0, 0, 0, -Infinity, 0, 0);
+ ctx.transform(0, 0, 0, NaN, 0, 0);
+ ctx.transform(0, 0, 0, 0, Infinity, 0);
+ ctx.transform(0, 0, 0, 0, -Infinity, 0);
+ ctx.transform(0, 0, 0, 0, NaN, 0);
+ ctx.transform(0, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, 0, -Infinity);
+ ctx.transform(0, 0, 0, 0, 0, NaN);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html
index 35cf997eb0a..c69756bc1d9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.transform.skewed.html
@@ -19,36 +19,35 @@
var t = async_test("transform() with skewy matrix transforms correctly");
_addTest(function(canvas, ctx) {
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
-
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.transform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
+
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.transform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.basic.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.basic.html
index 967d2d27614..189a1544b60 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.basic.html
@@ -19,14 +19,13 @@
var t = async_test("translate() works");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 90,40, 0,255,0,255);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html
index 83a8ebf7ba8..0857693aff9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/transformations/2d.transformation.translate.nonfinite.html
@@ -19,23 +19,22 @@
var t = async_test("translate() with Infinity/NaN is ignored");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.translate(Infinity, 0.1);
-ctx.translate(-Infinity, 0.1);
-ctx.translate(NaN, 0.1);
-ctx.translate(0.1, Infinity);
-ctx.translate(0.1, -Infinity);
-ctx.translate(0.1, NaN);
-ctx.translate(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.translate(Infinity, 0.1);
+ ctx.translate(-Infinity, 0.1);
+ ctx.translate(NaN, 0.1);
+ ctx.translate(0.1, Infinity);
+ ctx.translate(0.1, -Infinity);
+ ctx.translate(0.1, NaN);
+ ctx.translate(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/video/2d.video.invalid.html b/tests/wpt/web-platform-tests/html/canvas/element/video/2d.video.invalid.html
index 49062f02cc0..22b4e054f8a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/video/2d.video.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/video/2d.video.invalid.html
@@ -19,12 +19,11 @@
var t = async_test("Verify test doesn't crash with invalid video.");
_addTest(function(canvas, ctx) {
-var v = document.createElement('video');
-v.play();
-// Test is deliberately not waiting for the 'playing' event to fire.
-ctx.createPattern(v, 'repeat-x');
-ctx.drawImage(v, 0, 0);
-
+ var v = document.createElement('video');
+ v.play();
+ // Test is deliberately not waiting for the 'playing' event to fire.
+ ctx.createPattern(v, 'repeat-x');
+ ctx.drawImage(v, 0, 0);
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html
index 5c1a6008755..9c3d1b33747 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.html
@@ -19,40 +19,39 @@
var t = async_test("Test if fillText can be used with a solid display-p3 color");
_addTest(function(canvas, ctx) {
-deferTest();
+ deferTest();
-const fullRedInP3 = [255, 0, 0, 255];
-const sRGBRedInP3 = [234, 51, 35, 255];
+ const fullRedInP3 = [255, 0, 0, 255];
+ const sRGBRedInP3 = [234, 51, 35, 255];
-canvas.width = 100;
-canvas.height = 100;
+ canvas.width = 100;
+ canvas.height = 100;
-let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
-document.fonts.add(f);
-f.load().then(function() {
- t.step(function() {
- ctx.font = "40px Ahem";
+ let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
+ document.fonts.add(f);
+ f.load().then(function() {
+ t.step(function() {
+ ctx.font = "40px Ahem";
- ctx.fillStyle = "#f00";
- ctx.fillText("A", 0, 50);
+ ctx.fillStyle = "#f00";
+ ctx.fillText("A", 0, 50);
- ctx.fillStyle = "black";
- ctx.fillStyle = "color(display-p3 100% 0 0)";
- ctx.fillText("A", 50, 50);
+ ctx.fillStyle = "black";
+ ctx.fillStyle = "color(display-p3 100% 0 0)";
+ ctx.fillText("A", 50, 50);
- let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
- let pixelAt = function(x, y) {
- let offset = (y * canvas.width + x) * 4;
- return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
- };
+ let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
+ let pixelAt = function(x, y) {
+ let offset = (y * canvas.width + x) * 4;
+ return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
+ };
- assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
- assert_array_equals(pixelAt(75, 25), fullRedInP3);
-
- t.done();
- });
-});
+ assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
+ assert_array_equals(pixelAt(75, 25), fullRedInP3);
+ t.done();
+ });
+ });
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html
index 3bb74c6ae4a..cc459fb2cdf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.fillText.shadow.html
@@ -19,44 +19,43 @@
var t = async_test("Test if fillText can be used with a display-p3 shadow color");
_addTest(function(canvas, ctx) {
-deferTest();
-
-const fullRedInP3 = [255, 0, 0, 255];
-const sRGBRedInP3 = [234, 51, 35, 255];
-
-canvas.width = 100;
-canvas.height = 100;
-
-let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
-document.fonts.add(f);
-f.load().then(function() {
- t.step(function() {
- ctx.font = "40px Ahem";
-
- ctx.fillStyle = "black";
- ctx.shadowBlur = 4;
- ctx.shadowOffsetX = 0;
- ctx.shadowOffsetY = 50;
- ctx.shadowColor = "#f00";
- ctx.fillText("A", 0, 0);
-
- ctx.shadowColor = "black";
- ctx.shadowColor = "color(display-p3 100% 0 0)";
- ctx.fillText("A", 50, 0);
-
- let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
- let pixelAt = function(x, y) {
- let offset = (y * canvas.width + x) * 4;
- return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
- };
-
- assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
- assert_array_equals(pixelAt(75, 25), fullRedInP3);
-
- t.done();
- });
-});
-
+ deferTest();
+
+ const fullRedInP3 = [255, 0, 0, 255];
+ const sRGBRedInP3 = [234, 51, 35, 255];
+
+ canvas.width = 100;
+ canvas.height = 100;
+
+ let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
+ document.fonts.add(f);
+ f.load().then(function() {
+ t.step(function() {
+ ctx.font = "40px Ahem";
+
+ ctx.fillStyle = "black";
+ ctx.shadowBlur = 4;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.shadowColor = "#f00";
+ ctx.fillText("A", 0, 0);
+
+ ctx.shadowColor = "black";
+ ctx.shadowColor = "color(display-p3 100% 0 0)";
+ ctx.fillText("A", 50, 0);
+
+ let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
+ let pixelAt = function(x, y) {
+ let offset = (y * canvas.width + x) * 4;
+ return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
+ };
+
+ assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
+ assert_array_equals(pixelAt(75, 25), fullRedInP3);
+
+ t.done();
+ });
+ });
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html
index c38084a4449..626a41b49b4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.strokeText.html
@@ -19,41 +19,40 @@
var t = async_test("Test if strokeText can be used with a solid display-p3 color");
_addTest(function(canvas, ctx) {
-deferTest();
+ deferTest();
-const fullRedInP3 = [255, 0, 0, 255];
-const sRGBRedInP3 = [234, 51, 35, 255];
+ const fullRedInP3 = [255, 0, 0, 255];
+ const sRGBRedInP3 = [234, 51, 35, 255];
-canvas.width = 100;
-canvas.height = 100;
+ canvas.width = 100;
+ canvas.height = 100;
-let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
-document.fonts.add(f);
-f.load().then(function() {
- t.step(function() {
- ctx.font = "40px Ahem";
+ let f = new FontFace("Ahem", "url(/fonts/Ahem.ttf)");
+ document.fonts.add(f);
+ f.load().then(function() {
+ t.step(function() {
+ ctx.font = "40px Ahem";
- ctx.strokeStyle = "#f00";
- ctx.lineWidth = 20;
- ctx.strokeText("A", 0, 50);
+ ctx.strokeStyle = "#f00";
+ ctx.lineWidth = 20;
+ ctx.strokeText("A", 0, 50);
- ctx.strokeStyle = "black";
- ctx.strokeStyle = "color(display-p3 100% 0 0)";
- ctx.strokeText("A", 50, 50);
+ ctx.strokeStyle = "black";
+ ctx.strokeStyle = "color(display-p3 100% 0 0)";
+ ctx.strokeText("A", 50, 50);
- let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
- let pixelAt = function(x, y) {
- let offset = (y * canvas.width + x) * 4;
- return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
- };
+ let pixels = ctx.getImageData(0, 0, canvas.width, canvas.height, { colorSpace: "display-p3" }).data;
+ let pixelAt = function(x, y) {
+ let offset = (y * canvas.width + x) * 4;
+ return [pixels[offset], pixels[offset + 1], pixels[offset + 2], pixels[offset + 3]];
+ };
- assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
- assert_array_equals(pixelAt(75, 25), fullRedInP3);
-
- t.done();
- });
-});
+ assert_array_equals(pixelAt(25, 25), sRGBRedInP3);
+ assert_array_equals(pixelAt(75, 25), fullRedInP3);
+ t.done();
+ });
+ });
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html
index 063012f2826..a03f49740f1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.p3.html
@@ -19,20 +19,19 @@
var t = async_test("test getImageData with display-p3 and uint8 from display p3 uint8 canvas");
_addTest(function(canvas, ctx) {
-var color_style = 'rgb(50, 100, 150)';
-// [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
-var pixel_expected = [62, 99, 146, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
-
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-
+ var color_style = 'rgb(50, 100, 150)';
+ // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
+ var pixel_expected = [62, 99, 146, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
+
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
index 2cbeaf3b9b0..0433ae38c72 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
@@ -19,19 +19,18 @@
var t = async_test("test getImageData with srsb and uint8 from display p3 uint8 canvas");
_addTest(function(canvas, ctx) {
-var color_style = 'rgb(50, 100, 150)';
-var pixel_expected = [50, 100, 150, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
-
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-
+ var color_style = 'rgb(50, 100, 150)';
+ var pixel_expected = [50, 100, 150, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
+
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html
index ef954e4fbbe..1a44af20a63 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.p3.canvas.html
@@ -19,32 +19,31 @@
var t = async_test("test if toblob returns p3 data from p3 color space canvas");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = "rgba(155, 27, 27, 1)";
-ctx.fillRect(0, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 155, 27, 0)";
-ctx.fillRect(1, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
-ctx.fillRect(0, 1, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
-ctx.fillRect(1, 1, 1, 1);
-expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
-
-var image = new Image();
-image.onload = t.step_func_done(function() {
- var dstCanvas = document.createElement("canvas");
- dstCanvas.width = 2;
- dstCanvas.height = 2;
- var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
- ctx.drawImage(image, 0, 0);
- var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
- assert_array_approx_equals(actualPixels, expectedPixels, 2);
-});
-
-canvas.toBlob(function(blob) {
- var urlCreator = window.URL || window.webkitURL;
- image.src = urlCreator.createObjectURL(blob);
-}, 'image/png', 1);
-
+ ctx.fillStyle = "rgba(155, 27, 27, 1)";
+ ctx.fillRect(0, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 155, 27, 0)";
+ ctx.fillRect(1, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
+ ctx.fillRect(0, 1, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
+ ctx.fillRect(1, 1, 1, 1);
+ expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+
+ var image = new Image();
+ image.onload = t.step_func_done(function() {
+ var dstCanvas = document.createElement("canvas");
+ dstCanvas.width = 2;
+ dstCanvas.height = 2;
+ var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
+ ctx.drawImage(image, 0, 0);
+ var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+ assert_array_approx_equals(actualPixels, expectedPixels, 2);
+ });
+
+ canvas.toBlob(function(blob) {
+ var urlCreator = window.URL || window.webkitURL;
+ image.src = urlCreator.createObjectURL(blob);
+ }, 'image/png', 1);
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html
index 609310e1c68..a53de722593 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toBlob.with.putImageData.html
@@ -19,38 +19,37 @@
var t = async_test("Use putImageData to put some p3 data in canvas and test if toBlob returns the same data");
_addTest(function(canvas, ctx) {
-canvas.width = 2;
-canvas.height = 2;
-
-// Create an ImageData using createImageData and populate its data array.
-var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"});
-var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5],
- [255, 100, 150, 0.5], [255, 100, 150, 0]];
-var data = image_data.data;
-for (var i = 0; i < data.length / 4; ++i) {
- data[4*i + 0] = color_data[i][0];
- data[4*i + 1] = color_data[i][1];
- data[4*i + 2] = color_data[i][2];
- data[4*i + 3] = color_data[i][3];
-}
-ctx.putImageData(image_data, 0, 0);
-expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
-
-var image = new Image();
-image.onload = t.step_func_done(function() {
- var dstCanvas = document.createElement("canvas");
- dstCanvas.width = 2;
- dstCanvas.height = 2;
- var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
- ctx.drawImage(image, 0, 0);
- var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
- assert_array_approx_equals(actualPixels, expectedPixels, 2);
-});
-canvas.toBlob(function(blob) {
- var urlCreator = window.URL || window.webkitURL;
- image.src = urlCreator.createObjectURL(blob);
-}, 'image/png', 1);
-
+ canvas.width = 2;
+ canvas.height = 2;
+
+ // Create an ImageData using createImageData and populate its data array.
+ var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"});
+ var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5],
+ [255, 100, 150, 0.5], [255, 100, 150, 0]];
+ var data = image_data.data;
+ for (var i = 0; i < data.length / 4; ++i) {
+ data[4*i + 0] = color_data[i][0];
+ data[4*i + 1] = color_data[i][1];
+ data[4*i + 2] = color_data[i][2];
+ data[4*i + 3] = color_data[i][3];
+ }
+ ctx.putImageData(image_data, 0, 0);
+ expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+
+ var image = new Image();
+ image.onload = t.step_func_done(function() {
+ var dstCanvas = document.createElement("canvas");
+ dstCanvas.width = 2;
+ dstCanvas.height = 2;
+ var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
+ ctx.drawImage(image, 0, 0);
+ var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+ assert_array_approx_equals(actualPixels, expectedPixels, 2);
+ });
+ canvas.toBlob(function(blob) {
+ var urlCreator = window.URL || window.webkitURL;
+ image.src = urlCreator.createObjectURL(blob);
+ }, 'image/png', 1);
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html
index b07a0d645d3..e0986cb8e8a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.jpeg.p3.canvas.html
@@ -19,28 +19,27 @@
var t = async_test("test if toDataURL('image/jpeg') returns p3 data from canvas with p3 color space");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = "rgba(155, 27, 27, 1)";
-ctx.fillRect(0, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 155, 27, 0)";
-ctx.fillRect(1, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
-ctx.fillRect(0, 1, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
-ctx.fillRect(1, 1, 1, 1);
-expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
-
-var image = new Image();
-image.onload = t.step_func_done(function() {
- var dstCanvas = document.createElement("canvas");
- dstCanvas.width = 2;
- dstCanvas.height = 2;
- var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
- ctx.drawImage(image, 0, 0);
- var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
- assert_array_approx_equals(actualPixels, expectedPixels, 2);
-});
-image.src = canvas.toDataURL("image/jpeg");
-
+ ctx.fillStyle = "rgba(155, 27, 27, 1)";
+ ctx.fillRect(0, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 155, 27, 0)";
+ ctx.fillRect(1, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
+ ctx.fillRect(0, 1, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
+ ctx.fillRect(1, 1, 1, 1);
+ expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+
+ var image = new Image();
+ image.onload = t.step_func_done(function() {
+ var dstCanvas = document.createElement("canvas");
+ dstCanvas.width = 2;
+ dstCanvas.height = 2;
+ var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
+ ctx.drawImage(image, 0, 0);
+ var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+ assert_array_approx_equals(actualPixels, expectedPixels, 2);
+ });
+ image.src = canvas.toDataURL("image/jpeg");
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html
index 38b64298314..94ba7039803 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.p3.canvas.html
@@ -19,28 +19,27 @@
var t = async_test("test if toDataURL returns p3 data from canvas with p3 color space");
_addTest(function(canvas, ctx) {
-ctx.fillStyle = "rgba(155, 27, 27, 1)";
-ctx.fillRect(0, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 155, 27, 0)";
-ctx.fillRect(1, 0, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
-ctx.fillRect(0, 1, 1, 1);
-ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
-ctx.fillRect(1, 1, 1, 1);
-expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
-
-var image = new Image();
-image.onload = t.step_func_done(function() {
- var dstCanvas = document.createElement("canvas");
- dstCanvas.width = 2;
- dstCanvas.height = 2;
- var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
- ctx.drawImage(image, 0, 0);
- var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
- assert_array_approx_equals(actualPixels, expectedPixels, 2);
-});
-image.src = canvas.toDataURL();
-
+ ctx.fillStyle = "rgba(155, 27, 27, 1)";
+ ctx.fillRect(0, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 155, 27, 0)";
+ ctx.fillRect(1, 0, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 155, 0.5)";
+ ctx.fillRect(0, 1, 1, 1);
+ ctx.fillStyle = "rgba(27, 27, 27, 0.5)";
+ ctx.fillRect(1, 1, 1, 1);
+ expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+
+ var image = new Image();
+ image.onload = t.step_func_done(function() {
+ var dstCanvas = document.createElement("canvas");
+ dstCanvas.width = 2;
+ dstCanvas.height = 2;
+ var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
+ ctx.drawImage(image, 0, 0);
+ var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+ assert_array_approx_equals(actualPixels, expectedPixels, 2);
+ });
+ image.src = canvas.toDataURL();
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html
index 7eda499e73e..58d0718ebad 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html
+++ b/tests/wpt/web-platform-tests/html/canvas/element/wide-gamut-canvas/2d.color.space.p3.toDataURL.with.putImageData.html
@@ -19,35 +19,34 @@
var t = async_test("Use putImageData to put some p3 data in canvas and test if toDataURL returns the same data");
_addTest(function(canvas, ctx) {
-canvas.width = 2;
-canvas.height = 2;
-
-// Create an ImageData using createImageData and populate its data array.
-var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"});
-var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5],
- [255, 100, 150, 0.5], [255, 100, 150, 0]];
-var data = image_data.data;
-for (var i = 0; i < data.length / 4; ++i) {
- data[4*i + 0] = color_data[i][0];
- data[4*i + 1] = color_data[i][1];
- data[4*i + 2] = color_data[i][2];
- data[4*i + 3] = color_data[i][3];
-}
-ctx.putImageData(image_data, 0, 0);
-expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
-
-var image = new Image();
-image.onload = t.step_func_done(function() {
- var dstCanvas = document.createElement("canvas");
- dstCanvas.width = 2;
- dstCanvas.height = 2;
- var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
- ctx.drawImage(image, 0, 0);
- var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
- assert_array_approx_equals(actualPixels, expectedPixels, 2);
-});
-image.src = canvas.toDataURL();
-
+ canvas.width = 2;
+ canvas.height = 2;
+
+ // Create an ImageData using createImageData and populate its data array.
+ var image_data = ctx.createImageData(canvas.width, canvas.height, {colorSpace: "display-p3"});
+ var color_data = [[255, 100, 150, 1.0], [255, 100, 150, 0.5],
+ [255, 100, 150, 0.5], [255, 100, 150, 0]];
+ var data = image_data.data;
+ for (var i = 0; i < data.length / 4; ++i) {
+ data[4*i + 0] = color_data[i][0];
+ data[4*i + 1] = color_data[i][1];
+ data[4*i + 2] = color_data[i][2];
+ data[4*i + 3] = color_data[i][3];
+ }
+ ctx.putImageData(image_data, 0, 0);
+ expectedPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+
+ var image = new Image();
+ image.onload = t.step_func_done(function() {
+ var dstCanvas = document.createElement("canvas");
+ dstCanvas.width = 2;
+ dstCanvas.height = 2;
+ var ctx = dstCanvas.getContext('2d', {colorSpace: "display-p3"});
+ ctx.drawImage(image, 0, 0);
+ var actualPixels = ctx.getImageData(0, 0, 2, 2, {colorSpace: "display-p3"}).data;
+ assert_array_approx_equals(actualPixels, expectedPixels, 2);
+ });
+ image.src = canvas.toDataURL();
}, {colorSpace: "display-p3"});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html
index 90825d29d24..c096253e270 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.html
@@ -15,23 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-})(canvas, ctx);
-t.done();
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js
index fe644f2ca3e..ede4733a831 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvas.worker.js
@@ -13,19 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html
index 15db07d6c1e..2eb06556eff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.html
@@ -15,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'copy'
-ctx.globalAlpha = 0.51;
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
-})(canvas, ctx);
-t.done();
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'copy'
+ ctx.globalAlpha = 0.51;
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js
index e0ef84a78b4..f61859d2310 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvascopy.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'copy'
-ctx.globalAlpha = 0.51;
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'copy'
+ ctx.globalAlpha = 0.51;
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,130, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html
index f6ce643bc8a..cbfe1110922 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.html
@@ -15,24 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat');
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-})(canvas, ctx);
-t.done();
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js
index 2fb494d054a..7ecd568fae8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.canvaspattern.worker.js
@@ -13,20 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#f00';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat');
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#f00';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html
index 3d6983f90ce..57c3745d4e1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
-})(canvas, ctx);
-t.done();
+ _assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js
index 921c401551e..8acbd6a37fc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.default.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertSame(ctx.globalAlpha, 1.0, "ctx.globalAlpha", "1.0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html
index f2410facc07..7b31db198e5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.html
@@ -15,20 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-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);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js
index f354773bf46..3ea8aa7ebee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.fill.worker.js
@@ -13,16 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html
index cd7ee9cf2a5..4590a2ea1fe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.html
@@ -10,32 +10,21 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js
index 1c804a3961e..20953417ccf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.image.worker.js
@@ -6,30 +6,21 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html
index af1ca48e9d8..2fcbca84d21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.html
@@ -10,33 +10,22 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
- ctx.fillRect(0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js
index 58ef4f3b9dc..c6ab163b65b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.imagepattern.worker.js
@@ -6,31 +6,22 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
- ctx.fillRect(0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 2,253,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html
index a4149ced9f2..9bcf85f1c45 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.html
@@ -15,22 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-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 = Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = NaN;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-})(canvas, ctx);
-t.done();
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ ctx.globalAlpha = Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = NaN;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js
index 88f017dec7d..4ca577ad440 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.invalid.worker.js
@@ -13,18 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-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 = Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -Infinity;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = NaN;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ ctx.globalAlpha = Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -Infinity;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = NaN;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html
index 05736827be7..c064a41cbd9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.html
@@ -15,24 +15,25 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-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;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -0.1;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = 0;
-_assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
-ctx.globalAlpha = 1;
-_assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
-})(canvas, ctx);
-t.done();
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 1.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -0.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 0;
+ _assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
+ ctx.globalAlpha = 1;
+ _assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js
index cfd08366654..76ea8199098 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.globalAlpha.range.worker.js
@@ -13,20 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-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;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = -0.1;
-_assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
-ctx.globalAlpha = 0;
-_assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
-ctx.globalAlpha = 1;
-_assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalAlpha = 0.5;
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 1.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = -0.1;
+ _assertSame(ctx.globalAlpha, a, "ctx.globalAlpha", "a");
+ ctx.globalAlpha = 0;
+ _assertSame(ctx.globalAlpha, 0, "ctx.globalAlpha", "0");
+ ctx.globalAlpha = 1;
+ _assertSame(ctx.globalAlpha, 1, "ctx.globalAlpha", "1");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html
index f70fad638c2..f21b92f83e3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'Source-over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'Source-over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js
index b6f7adacb94..db1b54f5efe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.casesensitive.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'Source-over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'Source-over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html
index 0ffbc9eb2e6..02496b6d89c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'clear';
-_assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'clear';
+ _assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js
index e911da20232..947dd16c5f9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.clear.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'clear';
-_assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'clear';
+ _assertSame(ctx.globalCompositeOperation, 'clear', "ctx.globalCompositeOperation", "'clear'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html
index f4240b4e6e1..29dc039157c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'darker';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'darker';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js
index c90d4828e42..528f6b93d94 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.darker.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'darker';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'darker';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html
index b18d17b585a..106c0e73f4b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
-})(canvas, ctx);
-t.done();
+ _assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js
index 691c153ea7a..ffdb75ad75a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.default.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertSame(ctx.globalCompositeOperation, 'source-over', "ctx.globalCompositeOperation", "'source-over'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html
index ff12aa593e2..1ade1a4e549 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
- 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
- 'lighter', 'copy', 'xor'];
-for (var i = 0; i < modes.length; ++i)
-{
- ctx.globalCompositeOperation = modes[i];
- _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
-}
-})(canvas, ctx);
-t.done();
+ var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
+ 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
+ 'lighter', 'copy', 'xor'];
+ for (var i = 0; i < modes.length; ++i)
+ {
+ ctx.globalCompositeOperation = modes[i];
+ _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js
index 9009536ef7e..a266f1d537d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.get.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
- 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
- 'lighter', 'copy', 'xor'];
-for (var i = 0; i < modes.length; ++i)
-{
- ctx.globalCompositeOperation = modes[i];
- _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
-}
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var modes = ['source-atop', 'source-in', 'source-out', 'source-over',
+ 'destination-atop', 'destination-in', 'destination-out', 'destination-over',
+ 'lighter', 'copy', 'xor'];
+ for (var i = 0; i < modes.length; ++i)
+ {
+ ctx.globalCompositeOperation = modes[i];
+ _assertSame(ctx.globalCompositeOperation, modes[i], "ctx.globalCompositeOperation", "modes[\""+(i)+"\"]");
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html
index 175d7184bad..08def9a516b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'highlight';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'highlight';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js
index 234893aac7e..800c4605e62 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.highlight.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'highlight';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'highlight';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html
index 6572003dc3b..f021d40b53e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'source-over\0';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'source-over\0';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js
index ee3266e18af..1c1d5124a34 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.nullsuffix.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'source-over\0';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'source-over\0';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html
index 950ca3d687b..df934336c62 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js
index 97a4209c838..f75a462e935 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.over.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'over';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'over';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html
index 31a4639056c..c649102cc71 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'nonexistent';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'nonexistent';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js
index d02e9f1aa76..23a6630e82a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/compositing/2d.composite.operation.unrecognised.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'xor';
-ctx.globalCompositeOperation = 'nonexistent';
-_assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'xor';
+ ctx.globalCompositeOperation = 'nonexistent';
+ _assertSame(ctx.globalCompositeOperation, 'xor', "ctx.globalCompositeOperation", "'xor'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html
index 6846bd89477..e754e6c6ba9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.html
@@ -15,50 +15,48 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
-_assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
-_assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
-_assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
-_assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
-}
-if (ctx.setTransform) {
- _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
- _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
-}
-_assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
-_assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
-_assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
-_assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
-_assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
-_assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
-_assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
-_assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
-_assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
-if (ctx.fillText) {
- _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
- _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
-}
-if (ctx.putImageData) {
- _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
-}
-_assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
-})(canvas, ctx);
-t.done();
+ _assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
+ _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
+ _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
+ _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
+ _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
+ }
+ if (ctx.setTransform) {
+ _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
+ _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
+ }
+ _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
+ _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
+ _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
+ _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
+ _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
+ _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
+ _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
+ _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
+ _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
+ if (ctx.fillText) {
+ _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
+ _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
+ }
+ if (ctx.putImageData) {
+ _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
+ }
+ _assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js
index 8d6ddc894f6..b16a39fd3c9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.basics.worker.js
@@ -13,46 +13,45 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
-_assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
-_assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
-_assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
-_assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
-}
-if (ctx.setTransform) {
- _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
- _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
-}
-_assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
-_assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
-_assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
-_assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
-_assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
-_assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
-_assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
-_assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
-_assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
-_assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
-if (ctx.fillText) {
- _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
- _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
-}
-if (ctx.putImageData) {
- _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
-}
-_assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
-_assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertSame(ctx.save(), undefined, "ctx.save()", "undefined");
+ _assertSame(ctx.restore(), undefined, "ctx.restore()", "undefined");
+ _assertSame(ctx.scale(1, 1), undefined, "ctx.scale(1, 1)", "undefined");
+ _assertSame(ctx.rotate(0), undefined, "ctx.rotate(0)", "undefined");
+ _assertSame(ctx.translate(0, 0), undefined, "ctx.translate(0, 0)", "undefined");
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ _assertSame(ctx.transform(1, 0, 0, 1, 0, 0), undefined, "ctx.transform(1, 0, 0, 1, 0, 0)", "undefined");
+ }
+ if (ctx.setTransform) {
+ _assertSame(ctx.setTransform(1, 0, 0, 1, 0, 0), undefined, "ctx.setTransform(1, 0, 0, 1, 0, 0)", "undefined");
+ _assertSame(ctx.setTransform(), undefined, "ctx.setTransform()", "undefined");
+ }
+ _assertSame(ctx.clearRect(0, 0, 0, 0), undefined, "ctx.clearRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.fillRect(0, 0, 0, 0), undefined, "ctx.fillRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.strokeRect(0, 0, 0, 0), undefined, "ctx.strokeRect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.beginPath(), undefined, "ctx.beginPath()", "undefined");
+ _assertSame(ctx.closePath(), undefined, "ctx.closePath()", "undefined");
+ _assertSame(ctx.moveTo(0, 0), undefined, "ctx.moveTo(0, 0)", "undefined");
+ _assertSame(ctx.lineTo(0, 0), undefined, "ctx.lineTo(0, 0)", "undefined");
+ _assertSame(ctx.quadraticCurveTo(0, 0, 0, 0), undefined, "ctx.quadraticCurveTo(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.bezierCurveTo(0, 0, 0, 0, 0, 0), undefined, "ctx.bezierCurveTo(0, 0, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arcTo(0, 0, 0, 0, 1), undefined, "ctx.arcTo(0, 0, 0, 0, 1)", "undefined");
+ _assertSame(ctx.rect(0, 0, 0, 0), undefined, "ctx.rect(0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.arc(0, 0, 1, 0, 0, true), undefined, "ctx.arc(0, 0, 1, 0, 0, true)", "undefined");
+ _assertSame(ctx.fill(), undefined, "ctx.fill()", "undefined");
+ _assertSame(ctx.stroke(), undefined, "ctx.stroke()", "undefined");
+ _assertSame(ctx.clip(), undefined, "ctx.clip()", "undefined");
+ if (ctx.fillText) {
+ _assertSame(ctx.fillText('test', 0, 0), undefined, "ctx.fillText('test', 0, 0)", "undefined");
+ _assertSame(ctx.strokeText('test', 0, 0), undefined, "ctx.strokeText('test', 0, 0)", "undefined");
+ }
+ if (ctx.putImageData) {
+ _assertSame(ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0), undefined, "ctx.putImageData(ctx.getImageData(0, 0, 1, 1), 0, 0)", "undefined");
+ }
+ _assertSame(ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0), undefined, "ctx.drawImage(canvas, 0, 0, 1, 1, 0, 0, 0, 0)", "undefined");
+ _assertSame(ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white'), undefined, "ctx.createLinearGradient(0, 0, 0, 0).addColorStop(0, 'white')", "undefined");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html
index e6930c0ac5f..fe28a68e902 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.html
@@ -15,129 +15,127 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.scale(); });
-assert_throws_js(TypeError, function() { ctx.scale(1); });
-assert_throws_js(TypeError, function() { ctx.rotate(); });
-assert_throws_js(TypeError, function() { ctx.translate(); });
-assert_throws_js(TypeError, function() { ctx.translate(0); });
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- assert_throws_js(TypeError, function() { ctx.transform(); });
- assert_throws_js(TypeError, function() { ctx.transform(1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
-}
-if (ctx.setTransform) {
- assert_throws_js(TypeError, function() { ctx.setTransform(1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
-}
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
-assert_throws_js(TypeError, function() { ctx.clearRect(); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.moveTo(); });
-assert_throws_js(TypeError, function() { ctx.moveTo(0); });
-assert_throws_js(TypeError, function() { ctx.lineTo(); });
-assert_throws_js(TypeError, function() { ctx.lineTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(); });
-assert_throws_js(TypeError, function() { ctx.rect(0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(); });
-assert_throws_js(TypeError, function() { ctx.arc(0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
-// (6th argument to arc is optional)
-if (ctx.isPointInPath) {
- assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
- assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
-}
-if (ctx.drawFocusRing) {
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
-}
-if (ctx.fillText) {
- assert_throws_js(TypeError, function() { ctx.fillText(); });
- assert_throws_js(TypeError, function() { ctx.fillText('test'); });
- assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.strokeText(); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.measureText(); });
-}
-assert_throws_js(TypeError, function() { ctx.drawImage(); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
-// TODO: n >= 3 args on drawImage could be either a valid overload,
-// or too few for another overload, or too many for another
-// overload - what should happen?
-if (ctx.createImageData) {
- assert_throws_js(TypeError, function() { ctx.createImageData(); });
- assert_throws_js(TypeError, function() { ctx.createImageData(1); });
-}
-if (ctx.getImageData) {
- assert_throws_js(TypeError, function() { ctx.getImageData(); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
-}
-if (ctx.putImageData) {
- var imgdata = ctx.getImageData(0, 0, 1, 1);
- assert_throws_js(TypeError, function() { ctx.putImageData(); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
-}
-var g = ctx.createLinearGradient(0, 0, 0, 0);
-assert_throws_js(TypeError, function() { g.addColorStop(); });
-assert_throws_js(TypeError, function() { g.addColorStop(0); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.scale(); });
+ assert_throws_js(TypeError, function() { ctx.scale(1); });
+ assert_throws_js(TypeError, function() { ctx.rotate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(0); });
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ assert_throws_js(TypeError, function() { ctx.transform(); });
+ assert_throws_js(TypeError, function() { ctx.transform(1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
+ }
+ if (ctx.setTransform) {
+ assert_throws_js(TypeError, function() { ctx.setTransform(1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
+ }
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(); });
+ assert_throws_js(TypeError, function() { ctx.rect(0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(); });
+ assert_throws_js(TypeError, function() { ctx.arc(0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
+ // (6th argument to arc is optional)
+ if (ctx.isPointInPath) {
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
+ }
+ if (ctx.drawFocusRing) {
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
+ }
+ if (ctx.fillText) {
+ assert_throws_js(TypeError, function() { ctx.fillText(); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test'); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeText(); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.measureText(); });
+ }
+ assert_throws_js(TypeError, function() { ctx.drawImage(); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
+ // TODO: n >= 3 args on drawImage could be either a valid overload,
+ // or too few for another overload, or too many for another
+ // overload - what should happen?
+ if (ctx.createImageData) {
+ assert_throws_js(TypeError, function() { ctx.createImageData(); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(1); });
+ }
+ if (ctx.getImageData) {
+ assert_throws_js(TypeError, function() { ctx.getImageData(); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
+ }
+ if (ctx.putImageData) {
+ var imgdata = ctx.getImageData(0, 0, 1, 1);
+ assert_throws_js(TypeError, function() { ctx.putImageData(); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
+ }
+ var g = ctx.createLinearGradient(0, 0, 0, 0);
+ assert_throws_js(TypeError, function() { g.addColorStop(); });
+ assert_throws_js(TypeError, function() { g.addColorStop(0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js
index fe1b111f05b..f249fcb881a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/conformance-requirements/2d.conformance.requirements.missingargs.worker.js
@@ -13,125 +13,124 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.scale(); });
-assert_throws_js(TypeError, function() { ctx.scale(1); });
-assert_throws_js(TypeError, function() { ctx.rotate(); });
-assert_throws_js(TypeError, function() { ctx.translate(); });
-assert_throws_js(TypeError, function() { ctx.translate(0); });
-if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
- assert_throws_js(TypeError, function() { ctx.transform(); });
- assert_throws_js(TypeError, function() { ctx.transform(1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
-}
-if (ctx.setTransform) {
- assert_throws_js(TypeError, function() { ctx.setTransform(1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
- assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
-}
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
-assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
-assert_throws_js(TypeError, function() { ctx.clearRect(); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.moveTo(); });
-assert_throws_js(TypeError, function() { ctx.moveTo(0); });
-assert_throws_js(TypeError, function() { ctx.lineTo(); });
-assert_throws_js(TypeError, function() { ctx.lineTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(); });
-assert_throws_js(TypeError, function() { ctx.rect(0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
-assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(); });
-assert_throws_js(TypeError, function() { ctx.arc(0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
-assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
-// (6th argument to arc is optional)
-if (ctx.isPointInPath) {
- assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
- assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
-}
-if (ctx.drawFocusRing) {
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
- assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
-}
-if (ctx.fillText) {
- assert_throws_js(TypeError, function() { ctx.fillText(); });
- assert_throws_js(TypeError, function() { ctx.fillText('test'); });
- assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.strokeText(); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
- assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
- assert_throws_js(TypeError, function() { ctx.measureText(); });
-}
-assert_throws_js(TypeError, function() { ctx.drawImage(); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
-assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
-// TODO: n >= 3 args on drawImage could be either a valid overload,
-// or too few for another overload, or too many for another
-// overload - what should happen?
-if (ctx.createImageData) {
- assert_throws_js(TypeError, function() { ctx.createImageData(); });
- assert_throws_js(TypeError, function() { ctx.createImageData(1); });
-}
-if (ctx.getImageData) {
- assert_throws_js(TypeError, function() { ctx.getImageData(); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
- assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
-}
-if (ctx.putImageData) {
- var imgdata = ctx.getImageData(0, 0, 1, 1);
- assert_throws_js(TypeError, function() { ctx.putImageData(); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
- assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
-}
-var g = ctx.createLinearGradient(0, 0, 0, 0);
-assert_throws_js(TypeError, function() { g.addColorStop(); });
-assert_throws_js(TypeError, function() { g.addColorStop(0); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.scale(); });
+ assert_throws_js(TypeError, function() { ctx.scale(1); });
+ assert_throws_js(TypeError, function() { ctx.rotate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(); });
+ assert_throws_js(TypeError, function() { ctx.translate(0); });
+ if (ctx.transform) { // (avoid spurious failures, since the aim here is not to test that all features are supported)
+ assert_throws_js(TypeError, function() { ctx.transform(); });
+ assert_throws_js(TypeError, function() { ctx.transform(1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.transform(1, 0, 0, 1, 0); });
+ }
+ if (ctx.setTransform) {
+ assert_throws_js(TypeError, function() { ctx.setTransform(1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.setTransform(1, 0, 0, 1, 0); });
+ }
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createLinearGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0); });
+ assert_throws_js(TypeError, function() { ctx.createRadialGradient(0, 0, 1, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.createPattern(canvas); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.clearRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.fillRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeRect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(); });
+ assert_throws_js(TypeError, function() { ctx.moveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(); });
+ assert_throws_js(TypeError, function() { ctx.lineTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.quadraticCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.bezierCurveTo(0, 0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arcTo(0, 0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(); });
+ assert_throws_js(TypeError, function() { ctx.rect(0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.rect(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(); });
+ assert_throws_js(TypeError, function() { ctx.arc(0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1); });
+ assert_throws_js(TypeError, function() { ctx.arc(0, 0, 1, 0); });
+ // (6th argument to arc is optional)
+ if (ctx.isPointInPath) {
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(0); });
+ }
+ if (ctx.drawFocusRing) {
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawFocusRing(canvas, 0); });
+ }
+ if (ctx.fillText) {
+ assert_throws_js(TypeError, function() { ctx.fillText(); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test'); });
+ assert_throws_js(TypeError, function() { ctx.fillText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.strokeText(); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test'); });
+ assert_throws_js(TypeError, function() { ctx.strokeText('test', 0); });
+ assert_throws_js(TypeError, function() { ctx.measureText(); });
+ }
+ assert_throws_js(TypeError, function() { ctx.drawImage(); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(canvas, 0); });
+ // TODO: n >= 3 args on drawImage could be either a valid overload,
+ // or too few for another overload, or too many for another
+ // overload - what should happen?
+ if (ctx.createImageData) {
+ assert_throws_js(TypeError, function() { ctx.createImageData(); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(1); });
+ }
+ if (ctx.getImageData) {
+ assert_throws_js(TypeError, function() { ctx.getImageData(); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(0, 0, 1); });
+ }
+ if (ctx.putImageData) {
+ var imgdata = ctx.getImageData(0, 0, 1, 1);
+ assert_throws_js(TypeError, function() { ctx.putImageData(); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0); });
+ }
+ var g = ctx.createLinearGradient(0, 0, 0, 0);
+ assert_throws_js(TypeError, function() { g.addColorStop(); });
+ assert_throws_js(TypeError, function() { g.addColorStop(0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html
index a371d91431b..7f1f66654d4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.3arg</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,51 +10,28 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0);
- ctx.drawImage(bitmap1, -100, 0);
- ctx.drawImage(bitmap1, 100, 0);
- ctx.drawImage(bitmap1, 0, -50);
- ctx.drawImage(bitmap1, 0, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
-})(canvas, ctx);
-
-});
+promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0);
+ ctx.drawImage(bitmap_red, -100, 0);
+ ctx.drawImage(bitmap_red, 100, 0);
+ ctx.drawImage(bitmap_red, 0, -50);
+ ctx.drawImage(bitmap_red, 0, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js
index 22cb3653e41..b2f860bc606 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.3arg.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.3arg
// Description:
@@ -7,49 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0);
- ctx.drawImage(bitmap1, -100, 0);
- ctx.drawImage(bitmap1, 100, 0);
- ctx.drawImage(bitmap1, 0, -50);
- ctx.drawImage(bitmap1, 0, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
-});
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0);
+ ctx.drawImage(bitmap_red, -100, 0);
+ ctx.drawImage(bitmap_red, 100, 0);
+ ctx.drawImage(bitmap_red, 0, -50);
+ ctx.drawImage(bitmap_red, 0, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html
index 18ae25d829c..f7bf0568c4c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.5arg</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,52 +10,29 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 50, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 50, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
-})(canvas, ctx);
-
-});
+promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 50, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js
index 3906a5a00b3..f725acf0118 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.5arg.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.5arg
// Description:
@@ -7,50 +6,29 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 50, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 50, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
-});
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 50, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
index 508376cd60c..47e442e23eb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.9arg.basic</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,33 +10,22 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/green.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js
index 36770f779be..b2d6f7d860d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.basic.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.9arg.basic
// Description:
@@ -7,31 +6,22 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/green.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
index 079a57ddbc1..5e0f3f10881 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.9arg.destpos</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,53 +10,28 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
-})(canvas, ctx);
-
-});
+promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js
index 81fdae81df6..380d526f9b4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destpos.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.9arg.destpos
// Description:
@@ -7,51 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
-});
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
index 1996227c352..93b587a44ff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.9arg.destsize</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,53 +10,30 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
-})(canvas, ctx);
-
-});
+promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js
index 60fea26afe3..76e3e8baaf1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.destsize.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.9arg.destsize
// Description:
@@ -7,51 +6,30 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
-});
-Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- }, t_fail);
-}).then(t_pass, t_fail);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
-});
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
index 4742fa21220..e822ab43fa7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.9arg.sourcepos</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,33 +10,21 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js
index 2780240bd88..d3525435fa1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcepos.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.9arg.sourcepos
// Description:
@@ -7,31 +6,21 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
index fd1c853b88a..b99ca587683 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.9arg.sourcesize</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,40 +10,28 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 51, 26);
- ctx.fillRect(49, 24, 51, 26);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 51, 26);
+ ctx.fillRect(49, 24, 51, 26);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js
index 2bb379e7ebb..aa15efb7059 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.9arg.sourcesize.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.9arg.sourcesize
// Description:
@@ -7,38 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 51, 26);
- ctx.fillRect(49, 24, 51, 26);
- _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 51, 26);
+ ctx.fillRect(49, 24, 51, 26);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,20, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 20,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 80,30, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html
index 77134adfac5..a95f3ece7a2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.alpha</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,31 +10,20 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0;
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js
index 07d8d9288df..958a2431b6d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.alpha.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.alpha
// Description:
@@ -7,29 +6,20 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0;
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
index 2b33b7dd2d7..eccf14bfd04 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.animated.poster</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,28 +10,17 @@
<script>
-var t = async_test("drawImage() of an APNG draws the poster frame");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-fetch('anim-poster-gr.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ const response = await fetch('/images/anim-poster-gr.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "drawImage() of an APNG draws the poster frame");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js
index 5f246feb260..542c9382f64 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.animated.poster.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.animated.poster
// Description:drawImage() of an APNG draws the poster frame
@@ -7,26 +6,17 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("drawImage() of an APNG draws the poster frame");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-fetch('anim-poster-gr.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ const response = await fetch('/images/anim-poster-gr.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "drawImage() of an APNG draws the poster frame");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html
index d9890f3057b..a2afa05f01e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.broken</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,30 +10,15 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-fetch('/images/broken.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ const response = await fetch('/images/broken.png');
+ const blob = await response.blob();
-});
+ await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.');
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js
index 51560c443db..dc695b5459e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.broken.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.broken
// Description:
@@ -7,28 +6,15 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-fetch('/images/broken.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ const response = await fetch('/images/broken.png');
+ const blob = await response.blob();
-});
+ await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.');
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html
index dc144cb6f9d..e5eeedea6ec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.canvas</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -16,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js
index da01a86ba05..1f18cd77230 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.canvas.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.canvas
// Description:
@@ -14,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.drawImage(offscreenCanvas2, 0, 0);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.drawImage(offscreenCanvas2, 0, 0);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html
index 994f601651d..a828039b7be 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.clip</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,36 +10,25 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(-10, -10, 1, 1);
-ctx.clip();
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(-10, -10, 1, 1);
- ctx.clip();
- ctx.drawImage(document.getElementById('red.png'), 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js
index 1a462aff681..fea2a7bac70 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.clip.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.clip
// Description:
@@ -7,34 +6,25 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(-10, -10, 1, 1);
-ctx.clip();
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(-10, -10, 1, 1);
- ctx.clip();
- ctx.drawImage(document.getElementById('red.png'), 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html
index b4bc6f39ce9..b32b5a12ed9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.composite</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,31 +10,20 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-over';
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-over';
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js
index f6d4a5d284a..0b17673b689 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.composite.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.composite
// Description:
@@ -7,29 +6,20 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-over';
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-over';
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
index 98ca580e591..e201082e35c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.floatsource</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,28 +10,16 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-});
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js
index 7206099837d..1efc17d04d0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.floatsource.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.floatsource
// Description:
@@ -7,26 +6,16 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
index bfe2a9c96f6..3e43a772c65 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.negativedest</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,40 +10,28 @@
<script>
-var t = async_test("Negative destination width/height represents the correct rectangle");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
- ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
+ ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative destination width/height represents the correct rectangle");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js
index aebbb34b3ed..ce5cf5efadc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedest.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.negativedest
// Description:Negative destination width/height represents the correct rectangle
@@ -7,38 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Negative destination width/height represents the correct rectangle");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
- ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
+ ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
+}, "Negative destination width/height represents the correct rectangle");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
index 46c571f1539..347b634cfd9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.negativedir</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,40 +10,28 @@
<script>
-var t = async_test("Negative dimensions do not affect the direction of the image");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
- ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
+ ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative dimensions do not affect the direction of the image");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js
index 4bfb5433b86..c82b9ba1bec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativedir.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.negativedir
// Description:Negative dimensions do not affect the direction of the image
@@ -7,38 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Negative dimensions do not affect the direction of the image");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
- ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
+ ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
+}, "Negative dimensions do not affect the direction of the image");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
index 4e60d7e5e91..3e18725720b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.negativesource</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,40 +10,28 @@
<script>
-var t = async_test("Negative source width/height represents the correct rectangle");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
- ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
+ ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-});
+}, "Negative source width/height represents the correct rectangle");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js
index 6d0bec1a1db..f92d15774d7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.negativesource.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.negativesource
// Description:Negative source width/height represents the correct rectangle
@@ -7,38 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Negative source width/height represents the correct rectangle");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
- ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
- _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
+ ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
+ _assertPixelApprox(canvas, 1,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 48,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,1, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 51,48, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
+}, "Negative source width/height represents the correct rectangle");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
index dc932df3cd0..93dccd3d4e2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.nonfinite</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,330 +10,319 @@
<script>
-var t = async_test("drawImage() with Infinity/NaN is ignored");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, Infinity, 0);
-ctx.drawImage(bitmap, -Infinity, 0);
-ctx.drawImage(bitmap, NaN, 0);
-ctx.drawImage(bitmap, 0, Infinity);
-ctx.drawImage(bitmap, 0, -Infinity);
-ctx.drawImage(bitmap, 0, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, Infinity, 0);
+ ctx.drawImage(bitmap, -Infinity, 0);
+ ctx.drawImage(bitmap, NaN, 0);
+ ctx.drawImage(bitmap, 0, Infinity);
+ ctx.drawImage(bitmap, 0, -Infinity);
+ ctx.drawImage(bitmap, 0, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+
+}, "drawImage() with Infinity/NaN is ignored");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js
index 7dee1805806..a56f09e0b2d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nonfinite.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.nonfinite
// Description:drawImage() with Infinity/NaN is ignored
@@ -7,328 +6,319 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("drawImage() with Infinity/NaN is ignored");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, Infinity, 0);
-ctx.drawImage(bitmap, -Infinity, 0);
-ctx.drawImage(bitmap, NaN, 0);
-ctx.drawImage(bitmap, 0, Infinity);
-ctx.drawImage(bitmap, 0, -Infinity);
-ctx.drawImage(bitmap, 0, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
- ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
-ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, Infinity, 0);
+ ctx.drawImage(bitmap, -Infinity, 0);
+ ctx.drawImage(bitmap, NaN, 0);
+ ctx.drawImage(bitmap, 0, Infinity);
+ ctx.drawImage(bitmap, 0, -Infinity);
+ ctx.drawImage(bitmap, 0, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, -Infinity, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, NaN, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, -Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, NaN, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, -Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, NaN, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, -Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, NaN, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, -Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, NaN, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, -Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, NaN, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, -Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, NaN, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, -Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, NaN);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, Infinity, 0, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, Infinity, 100, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, Infinity, 50, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, Infinity, 0, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, Infinity, 0, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, 50);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, Infinity, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, Infinity, 100, Infinity);
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
+}, "drawImage() with Infinity/NaN is ignored");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
index fc167879786..1182baec3b1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.nowrap</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,32 +10,21 @@
<script>
-var t = async_test("Stretched images do not get pixels wrapping around the edges");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, -1950, 0, 2000, 50);
- _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, -1950, 0, 2000, 50);
+ _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
+
+}, "Stretched images do not get pixels wrapping around the edges");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js
index 539c6bf9772..47a77834c05 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.nowrap.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.nowrap
// Description:Stretched images do not get pixels wrapping around the edges
@@ -7,30 +6,21 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Stretched images do not get pixels wrapping around the edges");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, -1950, 0, 2000, 50);
- _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, -1950, 0, 2000, 50);
+ _assertPixelApprox(canvas, 45,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 55,25, 0,255,0,255, 2);
+ t.done();
+}, "Stretched images do not get pixels wrapping around the edges");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html
index 76c86b1b4af..7a8338b3530 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js
index 792dc6ef41c..329abd22215 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.null.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.drawImage(null, 0, 0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html
index 3977880de19..063353c11f3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.path</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,31 +10,20 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- ctx.fill();
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js
index 5132aa994f1..3259ff02580 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.path.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.path
// Description:
@@ -7,29 +6,20 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- ctx.fill();
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html
index 9e1777974c5..c5e51c27726 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.html
@@ -15,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50);
-ctx.drawImage(canvas, 50, 0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50);
+ ctx.drawImage(canvas, 50, 0);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js
index 01d47cb334e..a9af88d13a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.1.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50);
-ctx.drawImage(canvas, 50, 0);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50);
+ ctx.drawImage(canvas, 50, 0);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html
index f522d4822d3..ac674769663 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 1, 100, 49);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 1);
-ctx.drawImage(canvas, 0, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 1, 100, 49);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 1);
+ ctx.drawImage(canvas, 0, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 2);
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js
index 61a02c87a67..802d2d8c529 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.self.2.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 1, 100, 49);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 1);
-ctx.drawImage(canvas, 0, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 2);
-
-_assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 1, 100, 49);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 1);
+ ctx.drawImage(canvas, 0, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 2);
+ _assertPixelApprox(canvas, 0,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,0, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 0,49, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 99,49, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html
index d5317dd0063..50aeabd286d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.svg</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,28 +10,26 @@
<script>
-var t = async_test("drawImage() of an SVG image");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-fetch('/images/green.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/green.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
-});
-})(canvas, ctx);
-t.done();
+ });
-});
+}, "drawImage() of an SVG image");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js
index fda62017c26..a15371db39d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.svg.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.svg
// Description:drawImage() of an SVG image
@@ -7,26 +6,26 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("drawImage() of an SVG image");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-fetch('/images/green.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/green.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
});
-});
-t.done();
-
-});
+ });
+ t.done();
+}, "drawImage() of an SVG image");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html
index bdbdb393cf8..ca148c1a685 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.transform</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,31 +10,20 @@
<script>
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 0);
-fetch('red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(100, 0);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+
+}, "");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js
index a42f2785164..4a4cd07be95 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.transform.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.transform
// Description:
@@ -7,29 +6,20 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 0);
-fetch('red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
-});
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(100, 0);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
-});
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
index 5ea4234aa18..96906e8fc37 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js
index 9a52628c610..176e418d64a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.wrongtype.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.drawImage(undefined, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage(0, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.drawImage("", 0, 0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
index 5cb758c2b9b..a30c3007307 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.zerocanvas</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -16,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(0, 10);
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ var offscreenCanvas2 = new OffscreenCanvas(0, 10);
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-offscreenCanvas2.width = 10;
-offscreenCanvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ offscreenCanvas2.width = 10;
+ offscreenCanvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-offscreenCanvas2.width = 0;
-offscreenCanvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-})(canvas, ctx);
-t.done();
+ offscreenCanvas2.width = 0;
+ offscreenCanvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js
index 5f3764b1574..41346ad3288 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerocanvas.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.zerocanvas
// Description:
@@ -14,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-var offscreenCanvas2 = new OffscreenCanvas(0, 10);
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ var offscreenCanvas2 = new OffscreenCanvas(0, 10);
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-offscreenCanvas2.width = 10;
-offscreenCanvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-
-offscreenCanvas2.width = 0;
-offscreenCanvas2.height = 0;
-assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
-t.done();
+ offscreenCanvas2.width = 10;
+ offscreenCanvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ offscreenCanvas2.width = 0;
+ offscreenCanvas2.height = 0;
+ assert_throws_dom("INVALID_STATE_ERR", function() { ctx.drawImage(offscreenCanvas2, 0, 0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
index bdd68d20080..0239c5356da 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.zerosource</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,33 +10,20 @@
<script>
-var t = async_test("drawImage with zero-sized source rectangle draws nothing without exception");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-const red = async () => await createImageBitmap(await (await fetch("/images/red.png")).blob());
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
- });
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-});
+}, "drawImage with zero-sized source rectangle draws nothing without exception");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
index 5a0d4fcda29..4941d37347f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.html
@@ -1,7 +1,6 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>OffscreenCanvas test: 2d.drawImage.zerosource.image</title>
-<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/html/canvas/resources/canvas-tests.js"></script>
@@ -11,32 +10,28 @@
<script>
-var t = async_test("drawImage with zero-sized source rectangle from image draws nothing without exception");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(async function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/red-zerowidth.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/red-zerowidth.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ });
+ });
-});
+}, "drawImage with zero-sized source rectangle from image draws nothing without exception");
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js
index 729e0e97a4c..a3182c9b73f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.image.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.zerosource.image
// Description:drawImage with zero-sized source rectangle from image draws nothing without exception
@@ -7,30 +6,28 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("drawImage with zero-sized source rectangle from image draws nothing without exception");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-fetch('/images/red-zerowidth.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- _assertPixel(canvas, 50,25, 0,255,0,255);
- });
-});
-t.done();
-
-});
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/red-zerowidth.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ });
+ });
+ t.done();
+}, "drawImage with zero-sized source rectangle from image draws nothing without exception");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js
index 2655e3e91f5..a80bfff5621 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-images-to-the-canvas/2d.drawImage.zerosource.worker.js
@@ -1,4 +1,3 @@
-// META: timeout=long
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.drawImage.zerosource
// Description:drawImage with zero-sized source rectangle draws nothing without exception
@@ -7,31 +6,20 @@
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("drawImage with zero-sized source rectangle draws nothing without exception");
-var t_pass = t.done.bind(t);
-var t_fail = t.step_func(function(reason) {
- throw reason;
-});
-t.step(function() {
+promise_test(async t => {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-const red = async () => await createImageBitmap(await (await fetch("/images/red.png")).blob());
-fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
- _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
- });
- });
-t.done();
-
-});
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
+}, "drawImage with zero-sized source rectangle draws nothing without exception");
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
index 6975dda5bcb..02a9cb37ca4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js
index 5908ecca85b..8f3a7e46dee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.basic.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
index 4d67a5fadc6..2f0f1716011 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js
index 7fb5791cc9a..3d3caedbb1a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.clip.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.clearRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
index f5c0e52c02e..45875c52702 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.1;
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0.1;
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js
index 885e389ba52..1b07b66cb38 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalalpha.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalAlpha = 0.1;
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalAlpha = 0.1;
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
index f46245a6fd2..b57be641ca3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js
index a31962f73e0..e8c1c9b27c8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.globalcomposite.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.clearRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.clearRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
index ff96d1f0782..12126dfe87e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.html
@@ -15,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 50, 25);
-ctx.clearRect(100, 0, -50, 25);
-ctx.clearRect(0, 50, 50, -25);
-ctx.clearRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,0,0,0);
-_assertPixel(canvas, 75,12, 0,0,0,0);
-_assertPixel(canvas, 25,37, 0,0,0,0);
-_assertPixel(canvas, 75,37, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 50, 25);
+ ctx.clearRect(100, 0, -50, 25);
+ ctx.clearRect(0, 50, 50, -25);
+ ctx.clearRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,0,0,0);
+ _assertPixel(canvas, 75,12, 0,0,0,0);
+ _assertPixel(canvas, 25,37, 0,0,0,0);
+ _assertPixel(canvas, 75,37, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js
index c7390550b8a..62846aec8e7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.negative.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 50, 25);
-ctx.clearRect(100, 0, -50, 25);
-ctx.clearRect(0, 50, 50, -25);
-ctx.clearRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,0,0,0);
-_assertPixel(canvas, 75,12, 0,0,0,0);
-_assertPixel(canvas, 25,37, 0,0,0,0);
-_assertPixel(canvas, 75,37, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 50, 25);
+ ctx.clearRect(100, 0, -50, 25);
+ ctx.clearRect(0, 50, 50, -25);
+ ctx.clearRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,0,0,0);
+ _assertPixel(canvas, 75,12, 0,0,0,0);
+ _assertPixel(canvas, 25,37, 0,0,0,0);
+ _assertPixel(canvas, 75,37, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
index 24aa769bdd7..33278341468 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.html
@@ -15,40 +15,38 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(Infinity, 0, 100, 50);
-ctx.clearRect(-Infinity, 0, 100, 50);
-ctx.clearRect(NaN, 0, 100, 50);
-ctx.clearRect(0, Infinity, 100, 50);
-ctx.clearRect(0, -Infinity, 100, 50);
-ctx.clearRect(0, NaN, 100, 50);
-ctx.clearRect(0, 0, Infinity, 50);
-ctx.clearRect(0, 0, -Infinity, 50);
-ctx.clearRect(0, 0, NaN, 50);
-ctx.clearRect(0, 0, 100, Infinity);
-ctx.clearRect(0, 0, 100, -Infinity);
-ctx.clearRect(0, 0, 100, NaN);
-ctx.clearRect(Infinity, Infinity, 100, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
-ctx.clearRect(Infinity, Infinity, 100, Infinity);
-ctx.clearRect(Infinity, 0, Infinity, 50);
-ctx.clearRect(Infinity, 0, Infinity, Infinity);
-ctx.clearRect(Infinity, 0, 100, Infinity);
-ctx.clearRect(0, Infinity, Infinity, 50);
-ctx.clearRect(0, Infinity, Infinity, Infinity);
-ctx.clearRect(0, Infinity, 100, Infinity);
-ctx.clearRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(Infinity, 0, 100, 50);
+ ctx.clearRect(-Infinity, 0, 100, 50);
+ ctx.clearRect(NaN, 0, 100, 50);
+ ctx.clearRect(0, Infinity, 100, 50);
+ ctx.clearRect(0, -Infinity, 100, 50);
+ ctx.clearRect(0, NaN, 100, 50);
+ ctx.clearRect(0, 0, Infinity, 50);
+ ctx.clearRect(0, 0, -Infinity, 50);
+ ctx.clearRect(0, 0, NaN, 50);
+ ctx.clearRect(0, 0, 100, Infinity);
+ ctx.clearRect(0, 0, 100, -Infinity);
+ ctx.clearRect(0, 0, 100, NaN);
+ ctx.clearRect(Infinity, Infinity, 100, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.clearRect(Infinity, Infinity, 100, Infinity);
+ ctx.clearRect(Infinity, 0, Infinity, 50);
+ ctx.clearRect(Infinity, 0, Infinity, Infinity);
+ ctx.clearRect(Infinity, 0, 100, Infinity);
+ ctx.clearRect(0, Infinity, Infinity, 50);
+ ctx.clearRect(0, Infinity, Infinity, Infinity);
+ ctx.clearRect(0, Infinity, 100, Infinity);
+ ctx.clearRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js
index e4dc952200d..e2525df3be8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.nonfinite.worker.js
@@ -13,36 +13,35 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(Infinity, 0, 100, 50);
-ctx.clearRect(-Infinity, 0, 100, 50);
-ctx.clearRect(NaN, 0, 100, 50);
-ctx.clearRect(0, Infinity, 100, 50);
-ctx.clearRect(0, -Infinity, 100, 50);
-ctx.clearRect(0, NaN, 100, 50);
-ctx.clearRect(0, 0, Infinity, 50);
-ctx.clearRect(0, 0, -Infinity, 50);
-ctx.clearRect(0, 0, NaN, 50);
-ctx.clearRect(0, 0, 100, Infinity);
-ctx.clearRect(0, 0, 100, -Infinity);
-ctx.clearRect(0, 0, 100, NaN);
-ctx.clearRect(Infinity, Infinity, 100, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, 50);
-ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
-ctx.clearRect(Infinity, Infinity, 100, Infinity);
-ctx.clearRect(Infinity, 0, Infinity, 50);
-ctx.clearRect(Infinity, 0, Infinity, Infinity);
-ctx.clearRect(Infinity, 0, 100, Infinity);
-ctx.clearRect(0, Infinity, Infinity, 50);
-ctx.clearRect(0, Infinity, Infinity, Infinity);
-ctx.clearRect(0, Infinity, 100, Infinity);
-ctx.clearRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(Infinity, 0, 100, 50);
+ ctx.clearRect(-Infinity, 0, 100, 50);
+ ctx.clearRect(NaN, 0, 100, 50);
+ ctx.clearRect(0, Infinity, 100, 50);
+ ctx.clearRect(0, -Infinity, 100, 50);
+ ctx.clearRect(0, NaN, 100, 50);
+ ctx.clearRect(0, 0, Infinity, 50);
+ ctx.clearRect(0, 0, -Infinity, 50);
+ ctx.clearRect(0, 0, NaN, 50);
+ ctx.clearRect(0, 0, 100, Infinity);
+ ctx.clearRect(0, 0, 100, -Infinity);
+ ctx.clearRect(0, 0, 100, NaN);
+ ctx.clearRect(Infinity, Infinity, 100, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, 50);
+ ctx.clearRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.clearRect(Infinity, Infinity, 100, Infinity);
+ ctx.clearRect(Infinity, 0, Infinity, 50);
+ ctx.clearRect(Infinity, 0, Infinity, Infinity);
+ ctx.clearRect(Infinity, 0, 100, Infinity);
+ ctx.clearRect(0, Infinity, Infinity, 50);
+ ctx.clearRect(0, Infinity, Infinity, Infinity);
+ ctx.clearRect(0, Infinity, 100, Infinity);
+ ctx.clearRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
index e9716c9e594..25ad954d067 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 16, 16);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 16, 16);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js
index eee973df5a3..40f51f9f0e0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.path.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 16, 16);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 16, 16);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
index 904dfe9cd9d..3b3e41c19c6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.clearRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.clearRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js
index 74ac17c1d2f..a1ec8ac7ae4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.shadow.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.clearRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.clearRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
index a2ce63be0d7..8208b6f657e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.clearRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.clearRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js
index 8b76d4e0ae9..f176f3da8ac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.transform.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.clearRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.clearRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
index aaebbede940..461c318d241 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 0);
-ctx.clearRect(0, 0, 0, 50);
-ctx.clearRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 0);
+ ctx.clearRect(0, 0, 0, 50);
+ ctx.clearRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js
index 24c1c4253f8..b6f42551a2e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.clearRect.zero.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.clearRect(0, 0, 100, 0);
-ctx.clearRect(0, 0, 0, 50);
-ctx.clearRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.clearRect(0, 0, 100, 0);
+ ctx.clearRect(0, 0, 0, 50);
+ ctx.clearRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
index 6d8e6c62f74..3e65472b834 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.html
@@ -15,17 +15,15 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js
index 3a42a2a13b1..69918278e4d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.basic.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
index 5f38614713a..3b26960e246 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.html
@@ -15,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js
index 926821ac96d..890b31e342f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.clip.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
index 7e59325ff37..2a1942811f5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillRect(100, 0, -50, 25);
-ctx.fillRect(0, 50, 50, -25);
-ctx.fillRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillRect(100, 0, -50, 25);
+ ctx.fillRect(0, 50, 50, -25);
+ ctx.fillRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js
index b868dec9ff6..5df1652331a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.negative.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillRect(100, 0, -50, 25);
-ctx.fillRect(0, 50, 50, -25);
-ctx.fillRect(100, 50, -50, -25);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillRect(100, 0, -50, 25);
+ ctx.fillRect(0, 50, 50, -25);
+ ctx.fillRect(100, 50, -50, -25);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
index e5b5be1344f..e44a9d4b78a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.html
@@ -15,41 +15,39 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(Infinity, 0, 100, 50);
-ctx.fillRect(-Infinity, 0, 100, 50);
-ctx.fillRect(NaN, 0, 100, 50);
-ctx.fillRect(0, Infinity, 100, 50);
-ctx.fillRect(0, -Infinity, 100, 50);
-ctx.fillRect(0, NaN, 100, 50);
-ctx.fillRect(0, 0, Infinity, 50);
-ctx.fillRect(0, 0, -Infinity, 50);
-ctx.fillRect(0, 0, NaN, 50);
-ctx.fillRect(0, 0, 100, Infinity);
-ctx.fillRect(0, 0, 100, -Infinity);
-ctx.fillRect(0, 0, 100, NaN);
-ctx.fillRect(Infinity, Infinity, 100, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
-ctx.fillRect(Infinity, Infinity, 100, Infinity);
-ctx.fillRect(Infinity, 0, Infinity, 50);
-ctx.fillRect(Infinity, 0, Infinity, Infinity);
-ctx.fillRect(Infinity, 0, 100, Infinity);
-ctx.fillRect(0, Infinity, Infinity, 50);
-ctx.fillRect(0, Infinity, Infinity, Infinity);
-ctx.fillRect(0, Infinity, 100, Infinity);
-ctx.fillRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(Infinity, 0, 100, 50);
+ ctx.fillRect(-Infinity, 0, 100, 50);
+ ctx.fillRect(NaN, 0, 100, 50);
+ ctx.fillRect(0, Infinity, 100, 50);
+ ctx.fillRect(0, -Infinity, 100, 50);
+ ctx.fillRect(0, NaN, 100, 50);
+ ctx.fillRect(0, 0, Infinity, 50);
+ ctx.fillRect(0, 0, -Infinity, 50);
+ ctx.fillRect(0, 0, NaN, 50);
+ ctx.fillRect(0, 0, 100, Infinity);
+ ctx.fillRect(0, 0, 100, -Infinity);
+ ctx.fillRect(0, 0, 100, NaN);
+ ctx.fillRect(Infinity, Infinity, 100, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.fillRect(Infinity, Infinity, 100, Infinity);
+ ctx.fillRect(Infinity, 0, Infinity, 50);
+ ctx.fillRect(Infinity, 0, Infinity, Infinity);
+ ctx.fillRect(Infinity, 0, 100, Infinity);
+ ctx.fillRect(0, Infinity, Infinity, 50);
+ ctx.fillRect(0, Infinity, Infinity, Infinity);
+ ctx.fillRect(0, Infinity, 100, Infinity);
+ ctx.fillRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js
index 418250e4bf9..bc0170918c5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.nonfinite.worker.js
@@ -13,37 +13,36 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(Infinity, 0, 100, 50);
-ctx.fillRect(-Infinity, 0, 100, 50);
-ctx.fillRect(NaN, 0, 100, 50);
-ctx.fillRect(0, Infinity, 100, 50);
-ctx.fillRect(0, -Infinity, 100, 50);
-ctx.fillRect(0, NaN, 100, 50);
-ctx.fillRect(0, 0, Infinity, 50);
-ctx.fillRect(0, 0, -Infinity, 50);
-ctx.fillRect(0, 0, NaN, 50);
-ctx.fillRect(0, 0, 100, Infinity);
-ctx.fillRect(0, 0, 100, -Infinity);
-ctx.fillRect(0, 0, 100, NaN);
-ctx.fillRect(Infinity, Infinity, 100, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, 50);
-ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
-ctx.fillRect(Infinity, Infinity, 100, Infinity);
-ctx.fillRect(Infinity, 0, Infinity, 50);
-ctx.fillRect(Infinity, 0, Infinity, Infinity);
-ctx.fillRect(Infinity, 0, 100, Infinity);
-ctx.fillRect(0, Infinity, Infinity, 50);
-ctx.fillRect(0, Infinity, Infinity, Infinity);
-ctx.fillRect(0, Infinity, 100, Infinity);
-ctx.fillRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(Infinity, 0, 100, 50);
+ ctx.fillRect(-Infinity, 0, 100, 50);
+ ctx.fillRect(NaN, 0, 100, 50);
+ ctx.fillRect(0, Infinity, 100, 50);
+ ctx.fillRect(0, -Infinity, 100, 50);
+ ctx.fillRect(0, NaN, 100, 50);
+ ctx.fillRect(0, 0, Infinity, 50);
+ ctx.fillRect(0, 0, -Infinity, 50);
+ ctx.fillRect(0, 0, NaN, 50);
+ ctx.fillRect(0, 0, 100, Infinity);
+ ctx.fillRect(0, 0, 100, -Infinity);
+ ctx.fillRect(0, 0, 100, NaN);
+ ctx.fillRect(Infinity, Infinity, 100, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, 50);
+ ctx.fillRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.fillRect(Infinity, Infinity, 100, Infinity);
+ ctx.fillRect(Infinity, 0, Infinity, 50);
+ ctx.fillRect(Infinity, 0, Infinity, Infinity);
+ ctx.fillRect(Infinity, 0, 100, Infinity);
+ ctx.fillRect(0, Infinity, Infinity, 50);
+ ctx.fillRect(0, Infinity, Infinity, Infinity);
+ ctx.fillRect(0, Infinity, 100, Infinity);
+ ctx.fillRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
index 2f83eec2051..bcf7ee5a97a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js
index 0200fc568ee..ddbfc4a96d1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.path.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
index f4dd0b2194b..8a8e38070c6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.fillRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.fillRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js
index dea83df9aae..ff4ef0ca2db 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.shadow.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.fillRect(0, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.fillRect(0, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
index 900a5a720c4..19cb6ac77a1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js
index 8d0cb83c1bf..a7f328955b5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.transform.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -5, 10, 5);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -5, 10, 5);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
index 509b9b6eb49..3ec78ba18a8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 0);
-ctx.fillRect(0, 0, 0, 50);
-ctx.fillRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 0);
+ ctx.fillRect(0, 0, 0, 50);
+ ctx.fillRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js
index 48ee67ae748..a310d3ff28a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.fillRect.zero.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 0);
-ctx.fillRect(0, 0, 0, 50);
-ctx.fillRect(0, 0, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 0);
+ ctx.fillRect(0, 0, 0, 50);
+ ctx.fillRect(0, 0, 0, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
index 581c3884206..79cc3934b4d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js
index 304fc5ba843..de7b13c8f9b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.basic.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
index 646be33af1b..9990f2761ef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js
index d5a50443d3a..f70a421f1e8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.clip.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 16, 16);
-ctx.clip();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 16, 16);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 16, 16);
+ ctx.clip();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 16, 16);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
index a3e6af9b5cb..efc532f33f3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalAlpha = 0;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.globalAlpha = 0;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js
index 2556f656681..2f938b38486 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalalpha.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalAlpha = 0;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalAlpha = 0;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
index fb4b4a199e0..4532604c9a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.globalCompositeOperation = 'source-in';
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js
index 7c9859c7fb3..9de70c15a0c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.globalcomposite.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.globalCompositeOperation = 'source-in';
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(25, 24, 50, 2);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(25, 24, 50, 2);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
index 3d34371f8a7..13af38e565b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 25;
-ctx.strokeRect(12, 12, 26, 1);
-ctx.strokeRect(88, 12, -26, 1);
-ctx.strokeRect(12, 38, 26, -1);
-ctx.strokeRect(88, 38, -26, -1);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 25;
+ ctx.strokeRect(12, 12, 26, 1);
+ ctx.strokeRect(88, 12, -26, 1);
+ ctx.strokeRect(12, 38, 26, -1);
+ ctx.strokeRect(88, 38, -26, -1);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js
index c80a44680ca..bc2aa0434ba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.negative.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 25;
-ctx.strokeRect(12, 12, 26, 1);
-ctx.strokeRect(88, 12, -26, 1);
-ctx.strokeRect(12, 38, 26, -1);
-ctx.strokeRect(88, 38, -26, -1);
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 25;
+ ctx.strokeRect(12, 12, 26, 1);
+ ctx.strokeRect(88, 12, -26, 1);
+ ctx.strokeRect(12, 38, 26, -1);
+ ctx.strokeRect(88, 38, -26, -1);
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
index 808522830ac..63937974649 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.html
@@ -15,42 +15,40 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 150;
-ctx.strokeRect(Infinity, 0, 100, 50);
-ctx.strokeRect(-Infinity, 0, 100, 50);
-ctx.strokeRect(NaN, 0, 100, 50);
-ctx.strokeRect(0, Infinity, 100, 50);
-ctx.strokeRect(0, -Infinity, 100, 50);
-ctx.strokeRect(0, NaN, 100, 50);
-ctx.strokeRect(0, 0, Infinity, 50);
-ctx.strokeRect(0, 0, -Infinity, 50);
-ctx.strokeRect(0, 0, NaN, 50);
-ctx.strokeRect(0, 0, 100, Infinity);
-ctx.strokeRect(0, 0, 100, -Infinity);
-ctx.strokeRect(0, 0, 100, NaN);
-ctx.strokeRect(Infinity, Infinity, 100, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
-ctx.strokeRect(Infinity, Infinity, 100, Infinity);
-ctx.strokeRect(Infinity, 0, Infinity, 50);
-ctx.strokeRect(Infinity, 0, Infinity, Infinity);
-ctx.strokeRect(Infinity, 0, 100, Infinity);
-ctx.strokeRect(0, Infinity, Infinity, 50);
-ctx.strokeRect(0, Infinity, Infinity, Infinity);
-ctx.strokeRect(0, Infinity, 100, Infinity);
-ctx.strokeRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 150;
+ ctx.strokeRect(Infinity, 0, 100, 50);
+ ctx.strokeRect(-Infinity, 0, 100, 50);
+ ctx.strokeRect(NaN, 0, 100, 50);
+ ctx.strokeRect(0, Infinity, 100, 50);
+ ctx.strokeRect(0, -Infinity, 100, 50);
+ ctx.strokeRect(0, NaN, 100, 50);
+ ctx.strokeRect(0, 0, Infinity, 50);
+ ctx.strokeRect(0, 0, -Infinity, 50);
+ ctx.strokeRect(0, 0, NaN, 50);
+ ctx.strokeRect(0, 0, 100, Infinity);
+ ctx.strokeRect(0, 0, 100, -Infinity);
+ ctx.strokeRect(0, 0, 100, NaN);
+ ctx.strokeRect(Infinity, Infinity, 100, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.strokeRect(Infinity, Infinity, 100, Infinity);
+ ctx.strokeRect(Infinity, 0, Infinity, 50);
+ ctx.strokeRect(Infinity, 0, Infinity, Infinity);
+ ctx.strokeRect(Infinity, 0, 100, Infinity);
+ ctx.strokeRect(0, Infinity, Infinity, 50);
+ ctx.strokeRect(0, Infinity, Infinity, Infinity);
+ ctx.strokeRect(0, Infinity, 100, Infinity);
+ ctx.strokeRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js
index 4c1bc4c609d..1878e54c5f1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.nonfinite.worker.js
@@ -13,38 +13,37 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 150;
-ctx.strokeRect(Infinity, 0, 100, 50);
-ctx.strokeRect(-Infinity, 0, 100, 50);
-ctx.strokeRect(NaN, 0, 100, 50);
-ctx.strokeRect(0, Infinity, 100, 50);
-ctx.strokeRect(0, -Infinity, 100, 50);
-ctx.strokeRect(0, NaN, 100, 50);
-ctx.strokeRect(0, 0, Infinity, 50);
-ctx.strokeRect(0, 0, -Infinity, 50);
-ctx.strokeRect(0, 0, NaN, 50);
-ctx.strokeRect(0, 0, 100, Infinity);
-ctx.strokeRect(0, 0, 100, -Infinity);
-ctx.strokeRect(0, 0, 100, NaN);
-ctx.strokeRect(Infinity, Infinity, 100, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, 50);
-ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
-ctx.strokeRect(Infinity, Infinity, 100, Infinity);
-ctx.strokeRect(Infinity, 0, Infinity, 50);
-ctx.strokeRect(Infinity, 0, Infinity, Infinity);
-ctx.strokeRect(Infinity, 0, 100, Infinity);
-ctx.strokeRect(0, Infinity, Infinity, 50);
-ctx.strokeRect(0, Infinity, Infinity, Infinity);
-ctx.strokeRect(0, Infinity, 100, Infinity);
-ctx.strokeRect(0, 0, Infinity, Infinity);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 150;
+ ctx.strokeRect(Infinity, 0, 100, 50);
+ ctx.strokeRect(-Infinity, 0, 100, 50);
+ ctx.strokeRect(NaN, 0, 100, 50);
+ ctx.strokeRect(0, Infinity, 100, 50);
+ ctx.strokeRect(0, -Infinity, 100, 50);
+ ctx.strokeRect(0, NaN, 100, 50);
+ ctx.strokeRect(0, 0, Infinity, 50);
+ ctx.strokeRect(0, 0, -Infinity, 50);
+ ctx.strokeRect(0, 0, NaN, 50);
+ ctx.strokeRect(0, 0, 100, Infinity);
+ ctx.strokeRect(0, 0, 100, -Infinity);
+ ctx.strokeRect(0, 0, 100, NaN);
+ ctx.strokeRect(Infinity, Infinity, 100, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, 50);
+ ctx.strokeRect(Infinity, Infinity, Infinity, Infinity);
+ ctx.strokeRect(Infinity, Infinity, 100, Infinity);
+ ctx.strokeRect(Infinity, 0, Infinity, 50);
+ ctx.strokeRect(Infinity, 0, Infinity, Infinity);
+ ctx.strokeRect(Infinity, 0, 100, Infinity);
+ ctx.strokeRect(0, Infinity, Infinity, 50);
+ ctx.strokeRect(0, Infinity, Infinity, Infinity);
+ ctx.strokeRect(0, Infinity, 100, Infinity);
+ ctx.strokeRect(0, 0, Infinity, Infinity);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
index b7a99256572..da8e903f9c9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 5;
-ctx.strokeRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js
index 436bd03107d..839b973b171 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.path.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 5;
-ctx.strokeRect(0, 0, 16, 16);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(0, 0, 16, 16);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
index 769a6b19318..2adf24e2b56 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, -75, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, -75, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js
index 13beb42ff09..36b34550162 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.shadow.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.shadowColor = '#0f0';
-ctx.shadowBlur = 0;
-ctx.shadowOffsetX = 0;
-ctx.shadowOffsetY = 50;
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, -75, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.shadowColor = '#0f0';
+ ctx.shadowBlur = 0;
+ ctx.shadowOffsetX = 0;
+ ctx.shadowOffsetY = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, -75, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
index 08148a5cb27..214ea140234 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 5;
-ctx.strokeRect(2.5, -2.6, 5, 0.2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(2.5, -2.6, 5, 0.2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js
index 5958cf14069..43aab18533f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.transform.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.scale(10, 10);
-ctx.translate(0, 5);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 5;
-ctx.strokeRect(2.5, -2.6, 5, 0.2);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.scale(10, 10);
+ ctx.translate(0, 5);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 5;
+ ctx.strokeRect(2.5, -2.6, 5, 0.2);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
index 52d0964ab38..2c63913fca2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js
index be3da7c88a8..115017b3bf5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.1.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
index 42b50187daf..16bddea7ee3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js
index ab24ad34127..973ebec44a0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.2.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(50, 25, 0, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
index b5e6bddb6fd..8bf3e043dbe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js
index d9b365f7e80..2612e54fdb5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.3.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.strokeRect(0, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.strokeRect(0, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
index a07d9370378..87aeaf7c135 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js
index 23513a47507..3cec2063132 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.4.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 250;
-ctx.lineCap = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,0,0,0);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 250;
+ ctx.lineCap = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,0,0,0);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
index 363c27d680d..e03e7aa1182 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 250;
-ctx.lineJoin = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 250;
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js
index 0ef9e677254..8591409705f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/drawing-rectangles-to-the-canvas/2d.strokeRect.zero.5.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 250;
-ctx.lineJoin = 'round';
-ctx.strokeRect(100, 25, 100, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 250;
+ ctx.lineJoin = 'round';
+ ctx.strokeRect(100, 25, 100, 0);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
index f5332780c82..63f23bc1f71 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js
index 61f10308801..9a2baad6aba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.blur.exceptions.tentative.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 'foo'}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: [1,2]}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: {}}); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
index f3dd3037bb7..778d9fb2f80 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.html
@@ -15,57 +15,55 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
-ctx.fillStyle = '#f00';
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
-ctx.clearRect(0, 0, 100, 50);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
- 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0
-]});
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, 0, 50, 25);
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 25, 50, 25);
-ctx.fillStyle = '#fff';
-ctx.fillRect(50, 25, 50, 25);
-_assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
+ ctx.fillStyle = '#f00';
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
+ 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0
+ ]});
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, 0, 50, 25);
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 25, 50, 25);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(50, 25, 50, 25);
+ _assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js
index 19d57b61e53..ff5a6711306 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.colorMatrix.tentative.worker.js
@@ -13,53 +13,52 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
-ctx.fillStyle = '#f00';
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
-ctx.clearRect(0, 0, 100, 50);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
-ctx.fillRect(0, 0, 100, 50);
-_assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
-ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
- 0, 0, 0, 0, 0,
- 1, 1, 1, 1, 0,
- 0, 0, 0, 0, 0,
- 0, 0, 0, 1, 0
-]});
-ctx.fillRect(0, 0, 50, 25);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, 0, 50, 25);
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 25, 50, 25);
-ctx.fillStyle = '#fff';
-ctx.fillRect(50, 25, 50, 25);
-_assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: 'foo'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 'a']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'colorMatrix', values: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, Infinity]}); });
+ ctx.fillStyle = '#f00';
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 0});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 255,0,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 90});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,91,0,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 180});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,109,109,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'hueRotate', values: 270});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 109,18,255,255, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'saturate', values: 0.5});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 155,27,27,255, 2);
+ ctx.clearRect(0, 0, 100, 50);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', type: 'luminanceToAlpha'});
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixelApprox(canvas, 10,10, 0,0,0,54, 2);
+ ctx.filter = new CanvasFilter({filter: 'colorMatrix', values: [
+ 0, 0, 0, 0, 0,
+ 1, 1, 1, 1, 0,
+ 0, 0, 0, 0, 0,
+ 0, 0, 0, 1, 0
+ ]});
+ ctx.fillRect(0, 0, 50, 25);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, 0, 50, 25);
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 25, 50, 25);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(50, 25, 50, 25);
+ _assertPixelApprox(canvas, 10,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,10, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 10,30, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 60,30, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
index dd6fc9ee5ff..e91fc5502e0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.html
@@ -15,55 +15,53 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k];
-}
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k];
+ }
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'discrete', tableValues: tableValuesR},
- funcG: {type: 'discrete', tableValues: tableValuesG},
- funcB: {type: 'discrete', tableValues: tableValuesB},
-});
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'discrete', tableValues: tableValuesR},
+ funcG: {type: 'discrete', tableValues: tableValuesG},
+ funcB: {type: 'discrete', tableValues: tableValuesB},
+ });
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-})(canvas, ctx);
-t.done();
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js
index 79a5cd2475c..0a7752bf135 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.discrete.tentative.worker.js
@@ -13,51 +13,50 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k];
-}
-
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
-
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'discrete', tableValues: tableValuesR},
- funcG: {type: 'discrete', tableValues: tableValuesG},
- funcB: {type: 'discrete', tableValues: tableValuesB},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k];
+ }
+
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
+
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'discrete', tableValues: tableValuesR},
+ funcG: {type: 'discrete', tableValues: tableValuesG},
+ funcB: {type: 'discrete', tableValues: tableValuesB},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
index f2a9fcfd49a..6fa1244a1db 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.html
@@ -15,46 +15,44 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, amplitude, exponent, offset) {
- return [
- Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
- ];
-}
-
-const amplitudes = [2, 1.1, 0.5];
-const exponents = [5, 3, 1];
-const offsets = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
- funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
- funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, amplitudes, exponents, offsets);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, amplitude, exponent, offset) {
+ return [
+ Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
+ ];
+ }
+
+ const amplitudes = [2, 1.1, 0.5];
+ const exponents = [5, 3, 1];
+ const offsets = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
+ funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
+ funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, amplitudes, exponents, offsets);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js
index a36fa19a5ef..0a72055afb7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.gamma.tentative.worker.js
@@ -13,42 +13,41 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, amplitude, exponent, offset) {
- return [
- Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
- Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
- ];
-}
-
-const amplitudes = [2, 1.1, 0.5];
-const exponents = [5, 3, 1];
-const offsets = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
- funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
- funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, amplitudes, exponents, offsets);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, amplitude, exponent, offset) {
+ return [
+ Math.max(0, Math.min(1, Math.pow(inputColor[0]/255, exponent[0]) * amplitude[0] + offset[0])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[1]/255, exponent[1]) * amplitude[1] + offset[1])) * 255,
+ Math.max(0, Math.min(1, Math.pow(inputColor[2]/255, exponent[2]) * amplitude[2] + offset[2])) * 255,
+ ];
+ }
+
+ const amplitudes = [2, 1.1, 0.5];
+ const exponents = [5, 3, 1];
+ const offsets = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'gamma', amplitude: amplitudes[0], exponent: exponents[0], offset: offsets[0]},
+ funcG: {type: 'gamma', amplitude: amplitudes[1], exponent: exponents[1], offset: offsets[1]},
+ funcB: {type: 'gamma', amplitude: amplitudes[2], exponent: exponents[2], offset: offsets[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, amplitudes, exponents, offsets);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
index 33aae01eb05..552402c556b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.html
@@ -15,33 +15,31 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'identity'},
- funcG: {type: 'identity'},
- funcB: {type: 'identity'},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
- ctx.fillRect(0, 0, 10, 10);
- _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
-}
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'identity'},
+ funcG: {type: 'identity'},
+ funcB: {type: 'identity'},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js
index 7236c7087a1..861f86beb7a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.identity.tentative.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'identity'},
- funcG: {type: 'identity'},
- funcB: {type: 'identity'},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'identity'},
+ funcG: {type: 'identity'},
+ funcB: {type: 'identity'},
+ });
-for (const color of inputColors) {
- ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
- ctx.fillRect(0, 0, 10, 10);
- _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
-}
-t.done();
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+ for (const color of inputColors) {
+ ctx.fillStyle = `rgba(${color[0]}, ${color[1]}, ${color[2]}, 1)`,
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixel(canvas, 5, 5, color[0],color[1],color[2],255);
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
index 23731a1286c..3d842ab5b44 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.html
@@ -15,45 +15,43 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, slopes, intercepts) {
- return [
- Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
- Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
- Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
- ];
-}
-
-const slopes = [0.5, 1.2, -0.2];
-const intercepts = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
- funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
- funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, slopes, intercepts);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, slopes, intercepts) {
+ return [
+ Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
+ Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
+ Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
+ ];
+ }
+
+ const slopes = [0.5, 1.2, -0.2];
+ const intercepts = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
+ funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
+ funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, slopes, intercepts);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js
index 9a4499d4d6b..a3a8240906a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.linear.tentative.worker.js
@@ -13,41 +13,40 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getColor(inputColor, slopes, intercepts) {
- return [
- Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
- Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
- Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
- ];
-}
-
-const slopes = [0.5, 1.2, -0.2];
-const intercepts = [0.25, 0, 0.5];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
- funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
- funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, slopes, intercepts);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getColor(inputColor, slopes, intercepts) {
+ return [
+ Math.max(0, Math.min(1, inputColor[0]/255 * slopes[0] + intercepts[0])) * 255,
+ Math.max(0, Math.min(1, inputColor[1]/255 * slopes[1] + intercepts[1])) * 255,
+ Math.max(0, Math.min(1, inputColor[2]/255 * slopes[2] + intercepts[2])) * 255,
+ ];
+ }
+
+ const slopes = [0.5, 1.2, -0.2];
+ const intercepts = [0.25, 0, 0.5];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'linear', slope: slopes[0], intercept: intercepts[0]},
+ funcG: {type: 'linear', slope: slopes[1], intercept: intercepts[1]},
+ funcB: {type: 'linear', slope: slopes[2], intercept: intercepts[2]},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, slopes, intercepts);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
index c11e6adb910..caef1eaef33 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.html
@@ -15,55 +15,53 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length - 1;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
-}
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length - 1;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
+ }
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'table', tableValues: tableValuesR},
- funcG: {type: 'table', tableValues: tableValuesG},
- funcB: {type: 'table', tableValues: tableValuesB},
-});
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'table', tableValues: tableValuesR},
+ funcG: {type: 'table', tableValues: tableValuesG},
+ funcB: {type: 'table', tableValues: tableValuesB},
+ });
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-})(canvas, ctx);
-t.done();
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js
index 8ff791d3bb9..d23534a0145 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.componentTransfer.table.tentative.worker.js
@@ -13,51 +13,50 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-// From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
-function getTransformedValue(C, V) {
- // Get the right interval
- const n = V.length - 1;
- const k = C == 1 ? n - 1 : Math.floor(C * n);
- return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
-}
-
-function getColor(inputColor, tableValues) {
- const result = [0, 0, 0];
- for (const i in inputColor) {
- const C = inputColor[i]/255;
- const Cprime = getTransformedValue(C, tableValues[i]);
- result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
- }
- return result;
-}
-
-tableValuesR = [0, 0, 1, 1];
-tableValuesG = [2, 0, 0.5, 3];
-tableValuesB = [1, -1, 5, 0];
-ctx.filter = new CanvasFilter({filter: 'componentTransfer',
- funcR: {type: 'table', tableValues: tableValuesR},
- funcG: {type: 'table', tableValues: tableValuesG},
- funcB: {type: 'table', tableValues: tableValuesB},
-});
-
-const inputColors = [
- [255, 255, 255],
- [0, 0, 0],
- [127, 0, 34],
- [252, 186, 3],
- [50, 68, 87],
-];
-
-for (const color of inputColors) {
- let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
- ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
- ctx.fillRect(0, 0, 10, 10);
- _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
-}
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ // From https://www.w3.org/TR/SVG11/filters.html#feComponentTransferElement
+ function getTransformedValue(C, V) {
+ // Get the right interval
+ const n = V.length - 1;
+ const k = C == 1 ? n - 1 : Math.floor(C * n);
+ return V[k] + (C - k/n) * n * (V[k + 1] - V[k]);
+ }
+
+ function getColor(inputColor, tableValues) {
+ const result = [0, 0, 0];
+ for (const i in inputColor) {
+ const C = inputColor[i]/255;
+ const Cprime = getTransformedValue(C, tableValues[i]);
+ result[i] = Math.max(0, Math.min(1, Cprime)) * 255;
+ }
+ return result;
+ }
+
+ tableValuesR = [0, 0, 1, 1];
+ tableValuesG = [2, 0, 0.5, 3];
+ tableValuesB = [1, -1, 5, 0];
+ ctx.filter = new CanvasFilter({filter: 'componentTransfer',
+ funcR: {type: 'table', tableValues: tableValuesR},
+ funcG: {type: 'table', tableValues: tableValuesG},
+ funcB: {type: 'table', tableValues: tableValuesB},
+ });
+
+ const inputColors = [
+ [255, 255, 255],
+ [0, 0, 0],
+ [127, 0, 34],
+ [252, 186, 3],
+ [50, 68, 87],
+ ];
+
+ for (const color of inputColors) {
+ let outputColor = getColor(color, [tableValuesR, tableValuesG, tableValuesB]);
+ ctx.fillStyle = `rgb(${color[0]}, ${color[1]}, ${color[2]})`;
+ ctx.fillRect(0, 0, 10, 10);
+ _assertPixelApprox(canvas, 5, 5, outputColor[0],outputColor[1],outputColor[2],255, 2);
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
index c4b6df8e0db..fed21c695c9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.html
@@ -15,31 +15,29 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
-// This should not throw an error
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
+ // This should not throw an error
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js
index f7e616e7a63..02efed9496b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.convolveMatrix.exceptions.tentative.worker.js
@@ -13,27 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
-// This should not throw an error
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
-ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', divisor: 2}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: 1}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 'a'], [0]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], 0]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 0], [0, Infinity]]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: []}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [1, 2, 3, 4]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1, 2], []]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[], [1, 2]]}); });
+ // This should not throw an error
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[]]});
+ ctx.filter = new CanvasFilter({filter: 'convolveMatrix', kernelMatrix: [[1]]});
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
index e124341e441..4cd0dc8e1cb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.html
@@ -15,112 +15,110 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-// dx
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
-// dy
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
-// floodOpacity
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
-// stdDeviation
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
-// floodColor
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
+ // dx
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
+ // dy
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
+ // floodOpacity
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
+ // stdDeviation
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
+ // floodColor
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
-// dx
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
-// dy
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
-// floodOpacity
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
-// stdDeviation
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
-// floodColor
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
-})(canvas, ctx);
-t.done();
+ // dx
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
+ // dy
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
+ // floodOpacity
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
+ // stdDeviation
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
+ // floodColor
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js
index ac3f98ab235..9c30e5633aa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.dropShadow.exceptions.tentative.worker.js
@@ -13,108 +13,107 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-// dx
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
-// dy
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
-// floodOpacity
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
-// stdDeviation
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
-_assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
-// floodColor
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
-_assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
-
-// dx
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
-// dy
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
-// floodOpacity
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
-// stdDeviation
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
-// floodColor
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
-assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
-t.done();
+ // dx
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 10}), "new CanvasFilter({filter: 'dropShadow', dx: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: -1}), "new CanvasFilter({filter: 'dropShadow', dx: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: 0.5}), "new CanvasFilter({filter: 'dropShadow', dx: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: null}), "new CanvasFilter({filter: 'dropShadow', dx: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: true}), "new CanvasFilter({filter: 'dropShadow', dx: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: false}), "new CanvasFilter({filter: 'dropShadow', dx: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: []}), "new CanvasFilter({filter: 'dropShadow', dx: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: [20]}), "new CanvasFilter({filter: 'dropShadow', dx: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dx: '30'}), "new CanvasFilter({filter: 'dropShadow', dx: '30'})");
+ // dy
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 10}), "new CanvasFilter({filter: 'dropShadow', dy: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: -1}), "new CanvasFilter({filter: 'dropShadow', dy: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: 0.5}), "new CanvasFilter({filter: 'dropShadow', dy: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: null}), "new CanvasFilter({filter: 'dropShadow', dy: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: true}), "new CanvasFilter({filter: 'dropShadow', dy: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: false}), "new CanvasFilter({filter: 'dropShadow', dy: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: []}), "new CanvasFilter({filter: 'dropShadow', dy: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: [20]}), "new CanvasFilter({filter: 'dropShadow', dy: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', dy: '30'}), "new CanvasFilter({filter: 'dropShadow', dy: '30'})");
+ // floodOpacity
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 10}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: -1}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: null}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: true}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: false}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: []}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: [20]}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'}), "new CanvasFilter({filter: 'dropShadow', floodOpacity: '30'})");
+ // stdDeviation
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 10}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 10})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: -1}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: -1})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: 0.5})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: null}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: null})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: true}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: true})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: false}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: false})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: []}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: []})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [20]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [\""+(20)+"\"]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: '30'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [10, -1]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [0.5, null]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [true, false]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [20]]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: [[], [\""+(20)+"\"]]})");
+ _assert(new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]}), "new CanvasFilter({filter: 'dropShadow', stdDeviation: ['30', ['40']]})");
+ // floodColor
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'red'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'red'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'canvas'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'}), "new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(4, -3, 0.5, 1)'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#aabbccdd'})");
+ _assert(new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'}), "new CanvasFilter({filter: 'dropShadow', floodColor: '#abcd'})");
+ // dx
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dx: [1, 2]}); });
+ // dy
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', dy: [1, 2]}); });
+ // floodOpacity
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodOpacity: [1, 2]}); });
+ // stdDeviation
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: NaN}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: -Infinity}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: {}}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 2, 3]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, NaN]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, -Infinity]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, undefined]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, 'test']}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, {}]}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', stdDeviation: [1, [2, 3]]}); });
+ // floodColor
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'test'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 'rgba(NaN, 3, 2, 1)'}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: 10}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: undefined}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: null}); });
+ assert_throws_js(TypeError, function() { new CanvasFilter({filter: 'dropShadow', floodColor: NaN}); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
index 4d80dddf007..6b80005308d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.html
@@ -15,35 +15,33 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = new CanvasFilter([
- {filter: 'gaussianBlur', stdDeviation: 5},
- {filter: 'gaussianBlur', stdDeviation: 10}
-]);
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-var canvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = canvas2.getContext('2d');
-ctx2.filter = ctx.filter;
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-ctx.filter = 'this string is not a filter and should do nothing';
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-})(canvas, ctx);
-t.done();
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = new CanvasFilter([
+ {filter: 'gaussianBlur', stdDeviation: 5},
+ {filter: 'gaussianBlur', stdDeviation: 10}
+ ]);
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ var canvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.filter = ctx.filter;
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ ctx.filter = 'this string is not a filter and should do nothing';
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js
index 48c4a0448d9..8e2e794c39c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.tentative.worker.js
@@ -13,31 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = new CanvasFilter([
- {filter: 'gaussianBlur', stdDeviation: 5},
- {filter: 'gaussianBlur', stdDeviation: 10}
-]);
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-var canvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = canvas2.getContext('2d');
-ctx2.filter = ctx.filter;
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
-ctx.filter = 'this string is not a filter and should do nothing';
-_assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = new CanvasFilter([
+ {filter: 'gaussianBlur', stdDeviation: 5},
+ {filter: 'gaussianBlur', stdDeviation: 10}
+ ]);
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ var canvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = canvas2.getContext('2d');
+ ctx2.filter = ctx.filter;
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = new CanvasFilter({filter: 'gaussianBlur', stdDeviation: 5});
+ ctx.filter = 'this string is not a filter and should do nothing';
+ _assert(ctx.filter.toString() == '[object CanvasFilter]', "ctx.filter.toString() == '[object CanvasFilter]'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
index 2ed61e66d03..6392659c947 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.html
@@ -15,118 +15,116 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-const errorTestCases = [
- {baseFrequency: {}},
- {baseFrequency: -1},
- {baseFrequency: [0, -1]},
- {baseFrequency: NaN},
- {baseFrequency: Infinity},
- {baseFrequency: undefined},
- {baseFrequency: -Infinity},
- {baseFrequency: 'test'},
-
- {numOctaves: {}},
- {numOctaves: -1},
- {numOctaves: NaN},
- {numOctaves: Infinity},
- {numOctaves: undefined},
- {numOctaves: -Infinity},
- {numOctaves: [1, 1]},
- {numOctaves: 'test'},
-
- {seed: {}},
- {seed: NaN},
- {seed: Infinity},
- {seed: undefined},
- {seed: -Infinity},
- {seed: [1, 1]},
- {seed: 'test'},
-
- {stitchTiles: {}},
- {stitchTiles: NaN},
- {stitchTiles: Infinity},
- {stitchTiles: undefined},
- {stitchTiles: -Infinity},
- {stitchTiles: [1, 1]},
- {stitchTiles: 'test'},
- {stitchTiles: null},
- {stitchTiles: []},
- {stitchTiles: [10]},
- {stitchTiles: 30},
- {stitchTiles: false},
- {stitchTiles: true},
- {stitchTiles: '10'},
- {stitchTiles: -1},
-
- {type: {}},
- {type: NaN},
- {type: Infinity},
- {type: undefined},
- {type: -Infinity},
- {type: [1, 1]},
- {type: 'test'},
- {type: null},
- {type: []},
- {type: [10]},
- {type: 30},
- {type: false},
- {type: true},
- {type: '10'},
- {type: -1},
-]
-
-// null and [] = 0 when parsed as number
-const workingTestCases = [
- {baseFrequency: null},
- {baseFrequency: []},
- {baseFrequency: [10]},
- {baseFrequency: [10, 3]},
- {baseFrequency: 30},
- {baseFrequency: false},
- {baseFrequency: true},
- {baseFrequency: '10'},
-
- {numOctaves: null},
- {numOctaves: []},
- {numOctaves: [10]},
- {numOctaves: 30},
- {numOctaves: false},
- {numOctaves: true},
- {numOctaves: '10'},
-
- {seed: null},
- {seed: []},
- {seed: [10]},
- {seed: 30},
- {seed: false},
- {seed: true},
- {seed: '10'},
- {seed: -1},
-
- {stitchTiles: 'stitch'},
- {stitchTiles: 'noStitch'},
-
- {type: 'fractalNoise'},
- {type: 'turbulence'},
-]
-
-for (testCase of errorTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
-}
-
-for (testCase of workingTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
-}
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ const errorTestCases = [
+ {baseFrequency: {}},
+ {baseFrequency: -1},
+ {baseFrequency: [0, -1]},
+ {baseFrequency: NaN},
+ {baseFrequency: Infinity},
+ {baseFrequency: undefined},
+ {baseFrequency: -Infinity},
+ {baseFrequency: 'test'},
+
+ {numOctaves: {}},
+ {numOctaves: -1},
+ {numOctaves: NaN},
+ {numOctaves: Infinity},
+ {numOctaves: undefined},
+ {numOctaves: -Infinity},
+ {numOctaves: [1, 1]},
+ {numOctaves: 'test'},
+
+ {seed: {}},
+ {seed: NaN},
+ {seed: Infinity},
+ {seed: undefined},
+ {seed: -Infinity},
+ {seed: [1, 1]},
+ {seed: 'test'},
+
+ {stitchTiles: {}},
+ {stitchTiles: NaN},
+ {stitchTiles: Infinity},
+ {stitchTiles: undefined},
+ {stitchTiles: -Infinity},
+ {stitchTiles: [1, 1]},
+ {stitchTiles: 'test'},
+ {stitchTiles: null},
+ {stitchTiles: []},
+ {stitchTiles: [10]},
+ {stitchTiles: 30},
+ {stitchTiles: false},
+ {stitchTiles: true},
+ {stitchTiles: '10'},
+ {stitchTiles: -1},
+
+ {type: {}},
+ {type: NaN},
+ {type: Infinity},
+ {type: undefined},
+ {type: -Infinity},
+ {type: [1, 1]},
+ {type: 'test'},
+ {type: null},
+ {type: []},
+ {type: [10]},
+ {type: 30},
+ {type: false},
+ {type: true},
+ {type: '10'},
+ {type: -1},
+ ]
+
+ // null and [] = 0 when parsed as number
+ const workingTestCases = [
+ {baseFrequency: null},
+ {baseFrequency: []},
+ {baseFrequency: [10]},
+ {baseFrequency: [10, 3]},
+ {baseFrequency: 30},
+ {baseFrequency: false},
+ {baseFrequency: true},
+ {baseFrequency: '10'},
+
+ {numOctaves: null},
+ {numOctaves: []},
+ {numOctaves: [10]},
+ {numOctaves: 30},
+ {numOctaves: false},
+ {numOctaves: true},
+ {numOctaves: '10'},
+
+ {seed: null},
+ {seed: []},
+ {seed: [10]},
+ {seed: 30},
+ {seed: false},
+ {seed: true},
+ {seed: '10'},
+ {seed: -1},
+
+ {stitchTiles: 'stitch'},
+ {stitchTiles: 'noStitch'},
+
+ {type: 'fractalNoise'},
+ {type: 'turbulence'},
+ ]
+
+ for (testCase of errorTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
+ }
+
+ for (testCase of workingTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js
index 1bed65ad156..82f4ace5069 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.canvasFilterObject.turbulence.inputTypes.tentative.worker.js
@@ -13,114 +13,113 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-const errorTestCases = [
- {baseFrequency: {}},
- {baseFrequency: -1},
- {baseFrequency: [0, -1]},
- {baseFrequency: NaN},
- {baseFrequency: Infinity},
- {baseFrequency: undefined},
- {baseFrequency: -Infinity},
- {baseFrequency: 'test'},
-
- {numOctaves: {}},
- {numOctaves: -1},
- {numOctaves: NaN},
- {numOctaves: Infinity},
- {numOctaves: undefined},
- {numOctaves: -Infinity},
- {numOctaves: [1, 1]},
- {numOctaves: 'test'},
-
- {seed: {}},
- {seed: NaN},
- {seed: Infinity},
- {seed: undefined},
- {seed: -Infinity},
- {seed: [1, 1]},
- {seed: 'test'},
-
- {stitchTiles: {}},
- {stitchTiles: NaN},
- {stitchTiles: Infinity},
- {stitchTiles: undefined},
- {stitchTiles: -Infinity},
- {stitchTiles: [1, 1]},
- {stitchTiles: 'test'},
- {stitchTiles: null},
- {stitchTiles: []},
- {stitchTiles: [10]},
- {stitchTiles: 30},
- {stitchTiles: false},
- {stitchTiles: true},
- {stitchTiles: '10'},
- {stitchTiles: -1},
-
- {type: {}},
- {type: NaN},
- {type: Infinity},
- {type: undefined},
- {type: -Infinity},
- {type: [1, 1]},
- {type: 'test'},
- {type: null},
- {type: []},
- {type: [10]},
- {type: 30},
- {type: false},
- {type: true},
- {type: '10'},
- {type: -1},
-]
-
-// null and [] = 0 when parsed as number
-const workingTestCases = [
- {baseFrequency: null},
- {baseFrequency: []},
- {baseFrequency: [10]},
- {baseFrequency: [10, 3]},
- {baseFrequency: 30},
- {baseFrequency: false},
- {baseFrequency: true},
- {baseFrequency: '10'},
-
- {numOctaves: null},
- {numOctaves: []},
- {numOctaves: [10]},
- {numOctaves: 30},
- {numOctaves: false},
- {numOctaves: true},
- {numOctaves: '10'},
-
- {seed: null},
- {seed: []},
- {seed: [10]},
- {seed: 30},
- {seed: false},
- {seed: true},
- {seed: '10'},
- {seed: -1},
-
- {stitchTiles: 'stitch'},
- {stitchTiles: 'noStitch'},
-
- {type: 'fractalNoise'},
- {type: 'turbulence'},
-]
-
-for (testCase of errorTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
-}
-
-for (testCase of workingTestCases) {
- const filterOptions = {...{filter: 'turbulence'}, ...testCase};
- _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
-}
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ const errorTestCases = [
+ {baseFrequency: {}},
+ {baseFrequency: -1},
+ {baseFrequency: [0, -1]},
+ {baseFrequency: NaN},
+ {baseFrequency: Infinity},
+ {baseFrequency: undefined},
+ {baseFrequency: -Infinity},
+ {baseFrequency: 'test'},
+
+ {numOctaves: {}},
+ {numOctaves: -1},
+ {numOctaves: NaN},
+ {numOctaves: Infinity},
+ {numOctaves: undefined},
+ {numOctaves: -Infinity},
+ {numOctaves: [1, 1]},
+ {numOctaves: 'test'},
+
+ {seed: {}},
+ {seed: NaN},
+ {seed: Infinity},
+ {seed: undefined},
+ {seed: -Infinity},
+ {seed: [1, 1]},
+ {seed: 'test'},
+
+ {stitchTiles: {}},
+ {stitchTiles: NaN},
+ {stitchTiles: Infinity},
+ {stitchTiles: undefined},
+ {stitchTiles: -Infinity},
+ {stitchTiles: [1, 1]},
+ {stitchTiles: 'test'},
+ {stitchTiles: null},
+ {stitchTiles: []},
+ {stitchTiles: [10]},
+ {stitchTiles: 30},
+ {stitchTiles: false},
+ {stitchTiles: true},
+ {stitchTiles: '10'},
+ {stitchTiles: -1},
+
+ {type: {}},
+ {type: NaN},
+ {type: Infinity},
+ {type: undefined},
+ {type: -Infinity},
+ {type: [1, 1]},
+ {type: 'test'},
+ {type: null},
+ {type: []},
+ {type: [10]},
+ {type: 30},
+ {type: false},
+ {type: true},
+ {type: '10'},
+ {type: -1},
+ ]
+
+ // null and [] = 0 when parsed as number
+ const workingTestCases = [
+ {baseFrequency: null},
+ {baseFrequency: []},
+ {baseFrequency: [10]},
+ {baseFrequency: [10, 3]},
+ {baseFrequency: 30},
+ {baseFrequency: false},
+ {baseFrequency: true},
+ {baseFrequency: '10'},
+
+ {numOctaves: null},
+ {numOctaves: []},
+ {numOctaves: [10]},
+ {numOctaves: 30},
+ {numOctaves: false},
+ {numOctaves: true},
+ {numOctaves: '10'},
+
+ {seed: null},
+ {seed: []},
+ {seed: [10]},
+ {seed: 30},
+ {seed: false},
+ {seed: true},
+ {seed: '10'},
+ {seed: -1},
+
+ {stitchTiles: 'stitch'},
+ {stitchTiles: 'noStitch'},
+
+ {type: 'fractalNoise'},
+ {type: 'turbulence'},
+ ]
+
+ for (testCase of errorTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ assert_throws_js(TypeError, function() { new CanvasFilter(filterOptions); });
+ }
+
+ for (testCase of workingTestCases) {
+ const filterOptions = {...{filter: 'turbulence'}, ...testCase};
+ _assert(new CanvasFilter(filterOptions) != null, "new CanvasFilter(filterOptions) != null");
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.html
index 2267c9aa811..5594174cf6e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.html
@@ -15,44 +15,42 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.save();
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.restore();
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur(10)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'blur 10px';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'inherit';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'initial';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'unset';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = '';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = null;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = undefined;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur( 5px)';
-assert_equals(ctx.filter, 'blur( 5px)');
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.save();
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.restore();
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur(10)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'blur 10px';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'inherit';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'initial';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'unset';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = '';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = null;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = undefined;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur( 5px)';
+ assert_equals(ctx.filter, 'blur( 5px)');
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.worker.js
index 01403f398c6..2308315b63b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/filters/2d.filter.value.worker.js
@@ -13,40 +13,39 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.filter = 'blur(5px)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.save();
-ctx.filter = 'none';
-_assert(ctx.filter == 'none', "ctx.filter == 'none'");
-ctx.restore();
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur(10)';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'blur 10px';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'inherit';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'initial';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = 'unset';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = '';
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = null;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-ctx.filter = undefined;
-_assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
-
-ctx.filter = 'blur( 5px)';
-assert_equals(ctx.filter, 'blur( 5px)');
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.filter = 'blur(5px)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.save();
+ ctx.filter = 'none';
+ _assert(ctx.filter == 'none', "ctx.filter == 'none'");
+ ctx.restore();
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur(10)';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'blur 10px';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'inherit';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'initial';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = 'unset';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = '';
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = null;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+ ctx.filter = undefined;
+ _assert(ctx.filter == 'blur(5px)', "ctx.filter == 'blur(5px)'");
+
+ ctx.filter = 'blur( 5px)';
+ assert_equals(ctx.filter, 'blur( 5px)');
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html
index 72d97c663f8..0666e3098a7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha-expected.html
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html
new file mode 100644
index 00000000000..8a450275889
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending-expected.html
@@ -0,0 +1,32 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.alpha.blending</title>
+<h1>2d.layer.global-states.alpha.blending</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ canvas2 = document.createElement("canvas");
+ ctx2 = canvas2.getContext("2d");
+
+ ctx2.globalCompositeOperation = 'screen';
+ ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx2.fillRect(50, 50, 75, 50);
+ ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx2.fillRect(70, 70, 75, 50);
+
+ ctx.drawImage(canvas2, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html
index b3ce2285dc9..bb7dd933372 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending</title>
+<h1>2d.layer.global-states.alpha.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -17,11 +17,15 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html
new file mode 100644
index 00000000000..d7ba158d161
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow-expected.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ canvas2 = document.createElement("canvas");
+ ctx2 = canvas2.getContext("2d");
+
+ ctx2.globalCompositeOperation = 'screen';
+ ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx2.fillRect(50, 50, 75, 50);
+ ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx2.fillRect(70, 70, 75, 50);
+
+ ctx.drawImage(canvas2, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html
new file mode 100644
index 00000000000..70b32e43395
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html
new file mode 100644
index 00000000000..45932d4cd5d
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.shadow.w.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html
index 177bae4e32d..ff33fc45052 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.blending.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.alpha.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter</title>
-<h1>2d.layer.global-states.alpha.filter</h1>
+<link rel="match" href="2d.layer.global-states.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.blending</title>
+<h1>2d.layer.global-states.alpha.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -20,10 +20,14 @@
ctx.fill(circle);
ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html
index 12fc31209ac..951049e638c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.filter.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.alpha.composite</title>
+<h1>2d.layer.global-states.alpha.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,12 +16,13 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
+ ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html
index 88d339fb1b1..21582189b1d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.alpha.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite</title>
+<h1>2d.layer.global-states.alpha.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -19,10 +19,13 @@
ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html
new file mode 100644
index 00000000000..a669a2271e9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow-expected.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ canvas2 = document.createElement("canvas");
+ ctx2 = canvas2.getContext("2d");
+
+ ctx2.globalCompositeOperation = 'screen';
+ ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx2.fillRect(50, 50, 75, 50);
+ ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx2.fillRect(70, 70, 75, 50);
+
+ ctx.drawImage(canvas2, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html
new file mode 100644
index 00000000000..bb3d886b54f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html
new file mode 100644
index 00000000000..592f92921b8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.shadow.w.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html
index a95085ca894..2359e92790f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.globalcompositeoperation.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.composite.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.alpha.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.alpha.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.alpha.composite</title>
+<h1>2d.layer.global-states.alpha.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,10 +21,13 @@
ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html
index 7064f47b20a..67a8ae60249 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.html
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html
index 9daefc377bd..206eb750139 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow-expected.html
@@ -19,11 +19,12 @@
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html
index afbbac881e7..a67f5872f78 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.html
@@ -20,10 +20,14 @@
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html
index 9e0e7099340..35df72aabcd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.shadow.w.html
@@ -22,10 +22,14 @@
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html
index 59d528b2099..2db6b64738c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.w.html
@@ -23,6 +23,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html
index b4512e2455e..33fdf46a287 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.alpha.filter-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter</title>
-<h1>2d.layer.global-states.alpha.filter</h1>
+<title>Canvas test: 2d.layer.global-states.blending</title>
+<h1>2d.layer.global-states.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,12 +16,12 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalCompositeOperation = 'multiply';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html
index e8d3d5691bb..6bcfd2854a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.alpha.filter</title>
-<h1>2d.layer.global-states.alpha.filter</h1>
+<link rel="match" href="2d.layer.global-states.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending</title>
+<h1>2d.layer.global-states.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -17,11 +17,14 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html
index 857db7ba991..02275c8cc21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.alpha.filter.shadow</title>
-<h1>2d.layer.global-states.alpha.filter.shadow</h1>
+<title>Canvas test: 2d.layer.global-states.blending.shadow</title>
+<h1>2d.layer.global-states.blending.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -16,15 +16,15 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html
index 07d5d793791..f1e9b7d23a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.html
@@ -1,9 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.alpha.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-2; totalPixels=0-5824">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.shadow</title>
-<h1>2d.layer.global-states.alpha.filter.shadow</h1>
+<link rel="match" href="2d.layer.global-states.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending.shadow</title>
+<h1>2d.layer.global-states.blending.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -18,14 +17,17 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html
index 40039c247d6..1d22e94f6f9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.alpha.filter.shadow.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.shadow.w.html
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.alpha.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-2; totalPixels=0-5824">
-<title>Canvas test: 2d.layer.global-states.alpha.filter.shadow</title>
-<h1>2d.layer.global-states.alpha.filter.shadow</h1>
+<link rel="match" href="2d.layer.global-states.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending.shadow</title>
+<h1>2d.layer.global-states.blending.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -20,14 +19,17 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html
index 08e6c253562..227c72b80ac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.blending.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter</title>
-<h1>2d.layer.global-states.filter</h1>
+<link rel="match" href="2d.layer.global-states.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.blending</title>
+<h1>2d.layer.global-states.blending</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -19,10 +19,14 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.filter = 'sepia(1) opacity(30%)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html
index 7e2e021b552..ed7669c4cfa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.globalcompositeoperation-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.globalcompositeoperation</title>
-<h1>2d.layer.global-states.globalcompositeoperation</h1>
+<title>Canvas test: 2d.layer.global-states.composite</title>
+<h1>2d.layer.global-states.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html
index 1be83170f11..9d4d1dce8a4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.globalcompositeoperation</title>
-<h1>2d.layer.global-states.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite</title>
+<h1>2d.layer.global-states.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html
new file mode 100644
index 00000000000..e380cccab82
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow-expected.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.composite.shadow</title>
+<h1>2d.layer.global-states.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ canvas2 = document.createElement("canvas");
+ ctx2 = canvas2.getContext("2d");
+
+ ctx2.globalCompositeOperation = 'screen';
+ ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx2.fillRect(50, 50, 75, 50);
+ ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx2.fillRect(70, 70, 75, 50);
+
+ ctx.drawImage(canvas2, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html
new file mode 100644
index 00000000000..9ad39065c6a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite.shadow</title>
+<h1>2d.layer.global-states.composite.shadow</h1>
+<p class="desc">Checks that layers correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer();
+
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
+ ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html
index 6d21ffb8157..b45c9d3aadc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.globalcompositeoperation.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.shadow.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.filter.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter.globalcompositeoperation</title>
-<h1>2d.layer.global-states.filter.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite.shadow</title>
+<h1>2d.layer.global-states.composite.shadow</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -20,10 +20,16 @@
ctx.fill(circle);
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html
index 7757aa5d8a9..66493889b20 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.globalcompositeoperation.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.composite.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.globalcompositeoperation-expected.html">
-<title>Canvas test: 2d.layer.global-states.globalcompositeoperation</title>
-<h1>2d.layer.global-states.globalcompositeoperation</h1>
+<link rel="match" href="2d.layer.global-states.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.composite</title>
+<h1>2d.layer.global-states.composite</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -23,6 +23,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html
deleted file mode 100644
index cff8783b392..00000000000
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter-expected.html
+++ /dev/null
@@ -1,30 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.filter</title>
-<h1>2d.layer.global-states.filter</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
-<canvas id="canvas" width="200" height="200">
- <p class="fallback">FAIL (fallback content)</p>
-</canvas>
-<script>
- const canvas = document.getElementById("canvas");
- const ctx = canvas.getContext('2d');
-
- ctx.fillStyle = 'rgba(0, 0, 255, 1)';
-
- var circle = new Path2D();
- circle.arc(90, 90, 45, 0, 2 * Math.PI);
- ctx.fill(circle);
-
- ctx.filter = 'sepia(1) opacity(30%)';
-
- canvas2 = document.createElement("canvas");
- ctx2 = canvas2.getContext("2d");
-
- ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
- ctx2.fillRect(50, 50, 75, 50);
- ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
- ctx2.fillRect(70, 70, 75, 50);
-
- ctx.drawImage(canvas2, 0, 0);
-</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html
new file mode 100644
index 00000000000..f304700feb3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha</title>
+<h1>2d.layer.global-states.filter.alpha</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html
new file mode 100644
index 00000000000..7c91ce42293
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending-expected.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending</title>
+<h1>2d.layer.global-states.filter.alpha.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html
new file mode 100644
index 00000000000..37d0e3dd1c5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending</title>
+<h1>2d.layer.global-states.filter.alpha.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html
new file mode 100644
index 00000000000..d9c93719b99
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow-expected.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html
new file mode 100644
index 00000000000..93278cb5aa3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html
new file mode 100644
index 00000000000..783693f2c14
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.shadow.w.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html
new file mode 100644
index 00000000000..53533e4ece6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.blending.w.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.blending</title>
+<h1>2d.layer.global-states.filter.alpha.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html
new file mode 100644
index 00000000000..8e0d98648ea
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite-expected.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite</title>
+<h1>2d.layer.global-states.filter.alpha.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html
new file mode 100644
index 00000000000..f0af85f8f51
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.html
@@ -0,0 +1,41 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite</title>
+<h1>2d.layer.global-states.filter.alpha.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html
new file mode 100644
index 00000000000..26d13a4cae9
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow-expected.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html
new file mode 100644
index 00000000000..46cd28b6c2b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html
new file mode 100644
index 00000000000..044b75927b3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.shadow.w.html
@@ -0,0 +1,58 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html
new file mode 100644
index 00000000000..be25ca66b16
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.composite.w.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.composite</title>
+<h1>2d.layer.global-states.filter.alpha.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html
new file mode 100644
index 00000000000..6567094376b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha</title>
+<h1>2d.layer.global-states.filter.alpha</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html
new file mode 100644
index 00000000000..9cc735fd42c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.alpha.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.5;
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html
new file mode 100644
index 00000000000..3059bf306cd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.alpha.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.5;
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html
new file mode 100644
index 00000000000..a481073ccfc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.shadow.w.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha.shadow</title>
+<h1>2d.layer.global-states.filter.alpha.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.5;
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html
new file mode 100644
index 00000000000..b5d81078899
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.alpha.w.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.alpha-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.alpha</title>
+<h1>2d.layer.global-states.filter.alpha</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalAlpha = 0.6;
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html
new file mode 100644
index 00000000000..f81dcf72dc2
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.blending</title>
+<h1>2d.layer.global-states.filter.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html
new file mode 100644
index 00000000000..a574e829328
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending</title>
+<h1>2d.layer.global-states.filter.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html
new file mode 100644
index 00000000000..a48485f7e8a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.blending.shadow</title>
+<h1>2d.layer.global-states.filter.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html
new file mode 100644
index 00000000000..4bdf80337f8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending.shadow</title>
+<h1>2d.layer.global-states.filter.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html
new file mode 100644
index 00000000000..23cd4e834b0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.shadow.w.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.blending.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending.shadow</title>
+<h1>2d.layer.global-states.filter.blending.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html
new file mode 100644
index 00000000000..bd7a51d8987
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.blending.w.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.blending-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.blending</title>
+<h1>2d.layer.global-states.filter.blending</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'multiply';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html
new file mode 100644
index 00000000000..97e85a1593b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.composite</title>
+<h1>2d.layer.global-states.filter.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html
new file mode 100644
index 00000000000..663a953a29e
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite</title>
+<h1>2d.layer.global-states.filter.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html
new file mode 100644
index 00000000000..79191ee3910
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow-expected.html
@@ -0,0 +1,53 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.composite.shadow</title>
+<h1>2d.layer.global-states.filter.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html
new file mode 100644
index 00000000000..52ad8646f01
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.html
@@ -0,0 +1,43 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite.shadow</title>
+<h1>2d.layer.global-states.filter.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html
new file mode 100644
index 00000000000..bf7139edce6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.shadow.w.html
@@ -0,0 +1,57 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.composite.shadow-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite.shadow</title>
+<h1>2d.layer.global-states.filter.composite.shadow</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html
new file mode 100644
index 00000000000..1f30d1e5644
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.composite.w.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.composite-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.composite</title>
+<h1>2d.layer.global-states.filter.composite</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ ctx.globalCompositeOperation = 'source-in';
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.html
deleted file mode 100644
index a36a34d78e0..00000000000
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.html
+++ /dev/null
@@ -1,33 +0,0 @@
-<!DOCTYPE html>
-<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.filter-expected.html">
-<title>Canvas test: 2d.layer.global-states.filter</title>
-<h1>2d.layer.global-states.filter</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
-<canvas id="canvas" width="200" height="200">
- <p class="fallback">FAIL (fallback content)</p>
-</canvas>
-<script>
- const offscreen_canvas = new OffscreenCanvas(200, 200);
- const ctx = offscreen_canvas.getContext('2d');
-
- ctx.fillStyle = 'rgba(0, 0, 255, 1)';
-
- var circle = new Path2D();
- circle.arc(90, 90, 45, 0, 2 * Math.PI);
- ctx.fill(circle);
-
- ctx.filter = 'sepia(1) opacity(30%)';
-
- ctx.beginLayer();
-
- ctx.fillStyle = 'rgba(225, 0, 0, 1)';
- ctx.fillRect(50, 50, 75, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 1)';
- ctx.fillRect(70, 70, 75, 50);
-
- ctx.endLayer();
-
- const canvas = document.getElementById("canvas");
- canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
-</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html
new file mode 100644
index 00000000000..e56fe0b3602
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states-expected.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>Canvas test: 2d.layer.global-states.filter.no-global-states</title>
+<h1>2d.layer.global-states.filter.no-global-states</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const canvas = document.getElementById("canvas");
+ const ctx = canvas.getContext('2d');
+
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ // No global states.
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html
new file mode 100644
index 00000000000..0619faa944f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<link rel="match" href="2d.layer.global-states.filter.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.no-global-states</title>
+<h1>2d.layer.global-states.filter.no-global-states</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script>
+ const offscreen_canvas = new OffscreenCanvas(200, 200);
+ const ctx = offscreen_canvas.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ // No global states.
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const canvas = document.getElementById("canvas");
+ canvas.getContext('2d').drawImage(offscreen_canvas, 0, 0);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html
new file mode 100644
index 00000000000..3a716838200
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.no-global-states.w.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<html class="reftest-wait">
+<link rel="match" href="2d.layer.global-states.filter.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.filter.no-global-states</title>
+<h1>2d.layer.global-states.filter.no-global-states</h1>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
+<canvas id="canvas" width="200" height="200">
+ <p class="fallback">FAIL (fallback content)</p>
+</canvas>
+<script id='myWorker' type='text/worker'>
+ self.onmessage = function(e) {
+ const oc = new OffscreenCanvas(200, 200);
+ const ctx = oc.getContext('2d');
+
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ // No global states.
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+
+ const bitmap = oc.transferToImageBitmap();
+ self.postMessage(bitmap, bitmap);
+ };
+</script>
+<script>
+ const blob = new Blob([document.getElementById('myWorker').textContent]);
+ const worker = new Worker(URL.createObjectURL(blob));
+ worker.addEventListener('message', msg => {
+ const outputCtx = document.getElementById("canvas").getContext('2d');
+ outputCtx.drawImage(msg.data, 0, 0);
+ document.documentElement.classList.remove("reftest-wait");
+ });
+ worker.postMessage(null);
+</script>
+</html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html
index 6ec9b02f7cb..59cf16fa87d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow-expected.html
@@ -2,7 +2,7 @@
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<title>Canvas test: 2d.layer.global-states.filter.shadow</title>
<h1>2d.layer.global-states.filter.shadow</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
@@ -10,24 +10,43 @@
const canvas = document.getElementById("canvas");
const ctx = canvas.getContext('2d');
- ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%" y="-100%" width="300%" height="300%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
- var circle = new Path2D();
- circle.arc(90, 90, 45, 0, 2 * Math.PI);
- ctx.fill(circle);
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
- ctx.filter = 'sepia(1) opacity(70%)';
- ctx.shadowOffsetX = -10;
- ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
-
- canvas2 = document.createElement("canvas");
- ctx2 = canvas2.getContext("2d");
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
- ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
- ctx2.fillRect(50, 50, 75, 50);
- ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
- ctx2.fillRect(70, 70, 75, 50);
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
- ctx.drawImage(canvas2, 0, 0);
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html
index 16439c60c68..69120c105e5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.html
@@ -1,10 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<link rel="match" href="2d.layer.global-states.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-1; totalPixels=0-49">
<title>Canvas test: 2d.layer.global-states.filter.shadow</title>
<h1>2d.layer.global-states.filter.shadow</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
@@ -18,16 +17,22 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.filter = 'sepia(1) opacity(70%)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
- ctx.beginLayer();
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
- ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
ctx.fillRect(70, 70, 75, 50);
ctx.endLayer();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html
index 7abddb27c51..8a770b2911e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.filter.shadow.w.html
@@ -2,10 +2,9 @@
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
<link rel="match" href="2d.layer.global-states.filter.shadow-expected.html">
-<meta name=fuzzy content="maxDifference=0-1; totalPixels=0-49">
<title>Canvas test: 2d.layer.global-states.filter.shadow</title>
<h1>2d.layer.global-states.filter.shadow</h1>
-<p class="desc">Checks that layers correctly use global render states.</p>
+<p class="desc">Checks that layers with filters correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
</canvas>
@@ -20,16 +19,22 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- ctx.filter = 'sepia(1) opacity(70%)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
- ctx.beginLayer();
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
- ctx.fillStyle = 'rgba(225, 0, 0, 1)';
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 1)';
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
ctx.fillRect(70, 70, 75, 50);
ctx.endLayer();
diff --git a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html
index 139ff8ac944..b91a2ae8b52 100644
--- a/tests/wpt/web-platform-tests/html/canvas/element/layers/2d.layer.global-states.no_global_states-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states-expected.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<title>Canvas test: 2d.layer.global-states.no_global_states</title>
-<h1>2d.layer.global-states.no_global_states</h1>
+<title>Canvas test: 2d.layer.global-states.no-global-states</title>
+<h1>2d.layer.global-states.no-global-states</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,7 @@
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html
index 6769d47e771..022736c7b5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.html
@@ -1,8 +1,8 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
-<link rel="match" href="2d.layer.global-states.no_global_states-expected.html">
-<title>Canvas test: 2d.layer.global-states.no_global_states</title>
-<h1>2d.layer.global-states.no_global_states</h1>
+<link rel="match" href="2d.layer.global-states.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.no-global-states</title>
+<h1>2d.layer.global-states.no-global-states</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -21,6 +21,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html
index 7628d387e99..80ed4e4503d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no_global_states.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.no-global-states.w.html
@@ -1,9 +1,9 @@
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
<html class="reftest-wait">
-<link rel="match" href="2d.layer.global-states.no_global_states-expected.html">
-<title>Canvas test: 2d.layer.global-states.no_global_states</title>
-<h1>2d.layer.global-states.no_global_states</h1>
+<link rel="match" href="2d.layer.global-states.no-global-states-expected.html">
+<title>Canvas test: 2d.layer.global-states.no-global-states</title>
+<h1>2d.layer.global-states.no-global-states</h1>
<p class="desc">Checks that layers correctly use global render states.</p>
<canvas id="canvas" width="200" height="200">
<p class="fallback">FAIL (fallback content)</p>
@@ -23,6 +23,10 @@
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html
index 6787bdd1e50..ba56644d6c2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow-expected.html
@@ -18,11 +18,12 @@
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html
index 87b8224f856..6402dc57607 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.html
@@ -19,10 +19,14 @@
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html
index b8d59888729..e41e7aee464 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.global-states.shadow.w.html
@@ -21,10 +21,14 @@
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html
index 1944ea6d2ac..84ad6244740 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex-expected.html
@@ -14,7 +14,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.html
index b4b2a8da602..1d50bd4de61 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.html
@@ -16,7 +16,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html
index 5260cc2724d..7982a8dbc4f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/layers/2d.layer.several-complex.w.html
@@ -18,7 +18,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
index d5eb4cafb6b..145e145cb41 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.html
@@ -15,49 +15,47 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'butt';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 25,14, 0,255,0,255);
-_assertPixel(canvas, 25,15, 0,255,0,255);
-_assertPixel(canvas, 25,16, 0,255,0,255);
-_assertPixel(canvas, 25,34, 0,255,0,255);
-_assertPixel(canvas, 25,35, 0,255,0,255);
-_assertPixel(canvas, 25,36, 0,255,0,255);
-
-_assertPixel(canvas, 75,14, 0,255,0,255);
-_assertPixel(canvas, 75,15, 0,255,0,255);
-_assertPixel(canvas, 75,16, 0,255,0,255);
-_assertPixel(canvas, 75,34, 0,255,0,255);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-_assertPixel(canvas, 75,36, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'butt';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 25,14, 0,255,0,255);
+ _assertPixel(canvas, 25,15, 0,255,0,255);
+ _assertPixel(canvas, 25,16, 0,255,0,255);
+ _assertPixel(canvas, 25,34, 0,255,0,255);
+ _assertPixel(canvas, 25,35, 0,255,0,255);
+ _assertPixel(canvas, 25,36, 0,255,0,255);
+
+ _assertPixel(canvas, 75,14, 0,255,0,255);
+ _assertPixel(canvas, 75,15, 0,255,0,255);
+ _assertPixel(canvas, 75,16, 0,255,0,255);
+ _assertPixel(canvas, 75,34, 0,255,0,255);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
+ _assertPixel(canvas, 75,36, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js
index 3ad21e9da96..127393790cd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.butt.worker.js
@@ -13,45 +13,44 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'butt';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 25,14, 0,255,0,255);
-_assertPixel(canvas, 25,15, 0,255,0,255);
-_assertPixel(canvas, 25,16, 0,255,0,255);
-_assertPixel(canvas, 25,34, 0,255,0,255);
-_assertPixel(canvas, 25,35, 0,255,0,255);
-_assertPixel(canvas, 25,36, 0,255,0,255);
-
-_assertPixel(canvas, 75,14, 0,255,0,255);
-_assertPixel(canvas, 75,15, 0,255,0,255);
-_assertPixel(canvas, 75,16, 0,255,0,255);
-_assertPixel(canvas, 75,34, 0,255,0,255);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-_assertPixel(canvas, 75,36, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'butt';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 25,14, 0,255,0,255);
+ _assertPixel(canvas, 25,15, 0,255,0,255);
+ _assertPixel(canvas, 25,16, 0,255,0,255);
+ _assertPixel(canvas, 25,34, 0,255,0,255);
+ _assertPixel(canvas, 25,35, 0,255,0,255);
+ _assertPixel(canvas, 25,36, 0,255,0,255);
+
+ _assertPixel(canvas, 75,14, 0,255,0,255);
+ _assertPixel(canvas, 75,15, 0,255,0,255);
+ _assertPixel(canvas, 75,16, 0,255,0,255);
+ _assertPixel(canvas, 75,34, 0,255,0,255);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
+ _assertPixel(canvas, 75,36, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
index b26054fc162..edddeb08e7b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.html
@@ -15,34 +15,32 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js
index 50c81519d2e..b8357316e46 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.closed.worker.js
@@ -13,30 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
index 0570540ee39..2054bbc5155 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.html
@@ -15,40 +15,38 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'invalid';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'invalid';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'ROUND';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'ROUND';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round\0';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round\0';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round ';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round ';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = "";
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = "";
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'bevel';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-})(canvas, ctx);
-t.done();
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'bevel';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js
index bf933941023..813ceb7f669 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.invalid.worker.js
@@ -13,36 +13,35 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'invalid';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'invalid';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'ROUND';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'ROUND';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round\0';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round\0';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = 'round ';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'round ';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'butt';
-ctx.lineCap = "";
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-
-ctx.lineCap = 'butt';
-ctx.lineCap = 'bevel';
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-t.done();
+ ctx.lineCap = 'butt';
+ ctx.lineCap = "";
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt';
+ ctx.lineCap = 'bevel';
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html
index 54f904b4329..f26fbc686c4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.html
@@ -15,34 +15,32 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.lineTo(200, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.lineTo(200, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js
index ff081deb7d0..169010ac2ac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.open.worker.js
@@ -13,30 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'bevel';
-ctx.lineCap = 'square';
-ctx.lineWidth = 400;
-
-ctx.beginPath();
-ctx.moveTo(200, 200);
-ctx.lineTo(200, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 200);
-ctx.lineTo(200, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 400;
+
+ ctx.beginPath();
+ ctx.moveTo(200, 200);
+ ctx.lineTo(200, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 200);
+ ctx.lineTo(200, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html
index 788675310e6..31f5ba5423c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.html
@@ -15,65 +15,63 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-var tol = 1; // tolerance to avoid antialiasing artifacts
+ var tol = 1; // tolerance to avoid antialiasing artifacts
-ctx.lineCap = 'round';
-ctx.lineWidth = 20;
+ ctx.lineCap = 'round';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(35-tol, 15);
-ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
-ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(35-tol, 15);
+ ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
+ ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
+ ctx.fill();
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(85+tol, 15);
-ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
-ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(85+tol, 15);
+ ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
+ ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
+ ctx.fill();
-_assertPixel(canvas, 17,6, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 32,6, 0,255,0,255);
-_assertPixel(canvas, 17,43, 0,255,0,255);
-_assertPixel(canvas, 25,43, 0,255,0,255);
-_assertPixel(canvas, 32,43, 0,255,0,255);
+ _assertPixel(canvas, 17,6, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 32,6, 0,255,0,255);
+ _assertPixel(canvas, 17,43, 0,255,0,255);
+ _assertPixel(canvas, 25,43, 0,255,0,255);
+ _assertPixel(canvas, 32,43, 0,255,0,255);
-_assertPixel(canvas, 67,6, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 82,6, 0,255,0,255);
-_assertPixel(canvas, 67,43, 0,255,0,255);
-_assertPixel(canvas, 75,43, 0,255,0,255);
-_assertPixel(canvas, 82,43, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 67,6, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 82,6, 0,255,0,255);
+ _assertPixel(canvas, 67,43, 0,255,0,255);
+ _assertPixel(canvas, 75,43, 0,255,0,255);
+ _assertPixel(canvas, 82,43, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js
index f03579ee54b..a8d9c1b92f8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.round.worker.js
@@ -13,61 +13,60 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-var tol = 1; // tolerance to avoid antialiasing artifacts
+ var tol = 1; // tolerance to avoid antialiasing artifacts
-ctx.lineCap = 'round';
-ctx.lineWidth = 20;
+ ctx.lineCap = 'round';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(35-tol, 15);
-ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
-ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(35-tol, 15);
+ ctx.arc(25, 15, 10-tol, 0, Math.PI, true);
+ ctx.arc(25, 35, 10-tol, Math.PI, 0, true);
+ ctx.fill();
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(85+tol, 15);
-ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
-ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
-ctx.fill();
+ ctx.beginPath();
+ ctx.moveTo(85+tol, 15);
+ ctx.arc(75, 15, 10+tol, 0, Math.PI, true);
+ ctx.arc(75, 35, 10+tol, Math.PI, 0, true);
+ ctx.fill();
-_assertPixel(canvas, 17,6, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 32,6, 0,255,0,255);
-_assertPixel(canvas, 17,43, 0,255,0,255);
-_assertPixel(canvas, 25,43, 0,255,0,255);
-_assertPixel(canvas, 32,43, 0,255,0,255);
-
-_assertPixel(canvas, 67,6, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 82,6, 0,255,0,255);
-_assertPixel(canvas, 67,43, 0,255,0,255);
-_assertPixel(canvas, 75,43, 0,255,0,255);
-_assertPixel(canvas, 82,43, 0,255,0,255);
-t.done();
+ _assertPixel(canvas, 17,6, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 32,6, 0,255,0,255);
+ _assertPixel(canvas, 17,43, 0,255,0,255);
+ _assertPixel(canvas, 25,43, 0,255,0,255);
+ _assertPixel(canvas, 32,43, 0,255,0,255);
+ _assertPixel(canvas, 67,6, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 82,6, 0,255,0,255);
+ _assertPixel(canvas, 67,43, 0,255,0,255);
+ _assertPixel(canvas, 75,43, 0,255,0,255);
+ _assertPixel(canvas, 82,43, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html
index 9d4a03ecad2..0d2988877d4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.html
@@ -15,49 +15,47 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'square';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 5, 20, 40);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 5, 20, 40);
-
-_assertPixel(canvas, 25,4, 0,255,0,255);
-_assertPixel(canvas, 25,5, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 25,44, 0,255,0,255);
-_assertPixel(canvas, 25,45, 0,255,0,255);
-_assertPixel(canvas, 25,46, 0,255,0,255);
-
-_assertPixel(canvas, 75,4, 0,255,0,255);
-_assertPixel(canvas, 75,5, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 75,44, 0,255,0,255);
-_assertPixel(canvas, 75,45, 0,255,0,255);
-_assertPixel(canvas, 75,46, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 5, 20, 40);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 5, 20, 40);
+
+ _assertPixel(canvas, 25,4, 0,255,0,255);
+ _assertPixel(canvas, 25,5, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 25,44, 0,255,0,255);
+ _assertPixel(canvas, 25,45, 0,255,0,255);
+ _assertPixel(canvas, 25,46, 0,255,0,255);
+
+ _assertPixel(canvas, 75,4, 0,255,0,255);
+ _assertPixel(canvas, 75,5, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 75,44, 0,255,0,255);
+ _assertPixel(canvas, 75,45, 0,255,0,255);
+ _assertPixel(canvas, 75,46, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js
index 439f100409a..6776e9891ba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.square.worker.js
@@ -13,45 +13,44 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineCap = 'square';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 5, 20, 40);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 5, 20, 40);
-
-_assertPixel(canvas, 25,4, 0,255,0,255);
-_assertPixel(canvas, 25,5, 0,255,0,255);
-_assertPixel(canvas, 25,6, 0,255,0,255);
-_assertPixel(canvas, 25,44, 0,255,0,255);
-_assertPixel(canvas, 25,45, 0,255,0,255);
-_assertPixel(canvas, 25,46, 0,255,0,255);
-
-_assertPixel(canvas, 75,4, 0,255,0,255);
-_assertPixel(canvas, 75,5, 0,255,0,255);
-_assertPixel(canvas, 75,6, 0,255,0,255);
-_assertPixel(canvas, 75,44, 0,255,0,255);
-_assertPixel(canvas, 75,45, 0,255,0,255);
-_assertPixel(canvas, 75,46, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineCap = 'square';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 5, 20, 40);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 5, 20, 40);
+
+ _assertPixel(canvas, 25,4, 0,255,0,255);
+ _assertPixel(canvas, 25,5, 0,255,0,255);
+ _assertPixel(canvas, 25,6, 0,255,0,255);
+ _assertPixel(canvas, 25,44, 0,255,0,255);
+ _assertPixel(canvas, 25,45, 0,255,0,255);
+ _assertPixel(canvas, 25,46, 0,255,0,255);
+
+ _assertPixel(canvas, 75,4, 0,255,0,255);
+ _assertPixel(canvas, 75,5, 0,255,0,255);
+ _assertPixel(canvas, 75,6, 0,255,0,255);
+ _assertPixel(canvas, 75,44, 0,255,0,255);
+ _assertPixel(canvas, 75,45, 0,255,0,255);
+ _assertPixel(canvas, 75,46, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
index 996afb37a57..6334891f563 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'round';
-_assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
+ ctx.lineCap = 'round';
+ _assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
-ctx.lineCap = 'square';
-_assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
-})(canvas, ctx);
-t.done();
+ ctx.lineCap = 'square';
+ _assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js
index 52907f433ec..0010fd61dda 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cap.valid.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineCap = 'butt'
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ ctx.lineCap = 'butt'
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-ctx.lineCap = 'round';
-_assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
-
-ctx.lineCap = 'square';
-_assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
-t.done();
+ ctx.lineCap = 'round';
+ _assertSame(ctx.lineCap, 'round', "ctx.lineCap", "'round'");
+ ctx.lineCap = 'square';
+ _assertSame(ctx.lineCap, 'square', "ctx.lineCap", "'square'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.html
index 7c5821f2f56..83e2a758fd4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.html
@@ -15,31 +15,29 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'bevel';
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(110, 50);
-ctx.lineTo(110, 60);
-ctx.lineTo(100, 60);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'bevel';
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(110, 50);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(100, 60);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js
index e455aa6155d..5dc95c25f13 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.cross.worker.js
@@ -13,27 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'bevel';
-
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(110, 50);
-ctx.lineTo(110, 60);
-ctx.lineTo(100, 60);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'bevel';
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(110, 50);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(100, 60);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.html
index e8a39c08237..7f50257288c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-})(canvas, ctx);
-t.done();
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js
index 77116b44540..1a59b81027e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.defaults.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-_assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ _assertSame(ctx.lineCap, 'butt', "ctx.lineCap", "'butt'");
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
index 2554d714d92..fa67e3b3f82 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.strokeStyle = 'rgb(0, 255, 0)';
-ctx.strokeStyle = 'nonsense';
-ctx.lineWidth = 200;
-ctx.moveTo(0,100);
-ctx.lineTo(200,100);
-ctx.stroke();
-var imageData = ctx.getImageData(0, 0, 200, 200);
-var imgdata = imageData.data;
-_assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
-_assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
-_assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
-})(canvas, ctx);
-t.done();
+ ctx.strokeStyle = 'rgb(0, 255, 0)';
+ ctx.strokeStyle = 'nonsense';
+ ctx.lineWidth = 200;
+ ctx.moveTo(0,100);
+ ctx.lineTo(200,100);
+ ctx.stroke();
+ var imageData = ctx.getImageData(0, 0, 200, 200);
+ var imgdata = imageData.data;
+ _assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
+ _assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
+ _assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js
index c9f2fa3d9f2..5726b1835a4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.invalid.strokestyle.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.strokeStyle = 'rgb(0, 255, 0)';
-ctx.strokeStyle = 'nonsense';
-ctx.lineWidth = 200;
-ctx.moveTo(0,100);
-ctx.lineTo(200,100);
-ctx.stroke();
-var imageData = ctx.getImageData(0, 0, 200, 200);
-var imgdata = imageData.data;
-_assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
-_assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
-_assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.strokeStyle = 'rgb(0, 255, 0)';
+ ctx.strokeStyle = 'nonsense';
+ ctx.lineWidth = 200;
+ ctx.moveTo(0,100);
+ ctx.lineTo(200,100);
+ ctx.stroke();
+ var imageData = ctx.getImageData(0, 0, 200, 200);
+ var imgdata = imageData.data;
+ _assert(imgdata[4] == 0, "imgdata[\""+(4)+"\"] == 0");
+ _assert(imgdata[5] == 255, "imgdata[\""+(5)+"\"] == 255");
+ _assert(imgdata[6] == 0, "imgdata[\""+(6)+"\"] == 0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
index b2325ad9891..70e3896281d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.html
@@ -15,68 +15,66 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'bevel';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.lineTo(40-tol, 20);
-ctx.lineTo(30, 10+tol);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.lineTo(90+tol, 20);
-ctx.lineTo(80, 10-tol);
-ctx.fill();
-
-_assertPixel(canvas, 34,16, 0,255,0,255);
-_assertPixel(canvas, 34,15, 0,255,0,255);
-_assertPixel(canvas, 35,15, 0,255,0,255);
-_assertPixel(canvas, 36,15, 0,255,0,255);
-_assertPixel(canvas, 36,14, 0,255,0,255);
-
-_assertPixel(canvas, 84,16, 0,255,0,255);
-_assertPixel(canvas, 84,15, 0,255,0,255);
-_assertPixel(canvas, 85,15, 0,255,0,255);
-_assertPixel(canvas, 86,15, 0,255,0,255);
-_assertPixel(canvas, 86,14, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.lineTo(40-tol, 20);
+ ctx.lineTo(30, 10+tol);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.lineTo(90+tol, 20);
+ ctx.lineTo(80, 10-tol);
+ ctx.fill();
+
+ _assertPixel(canvas, 34,16, 0,255,0,255);
+ _assertPixel(canvas, 34,15, 0,255,0,255);
+ _assertPixel(canvas, 35,15, 0,255,0,255);
+ _assertPixel(canvas, 36,15, 0,255,0,255);
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+
+ _assertPixel(canvas, 84,16, 0,255,0,255);
+ _assertPixel(canvas, 84,15, 0,255,0,255);
+ _assertPixel(canvas, 85,15, 0,255,0,255);
+ _assertPixel(canvas, 86,15, 0,255,0,255);
+ _assertPixel(canvas, 86,14, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js
index 87bf6a8d37c..efd884debe1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.bevel.worker.js
@@ -13,64 +13,63 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'bevel';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.lineTo(40-tol, 20);
-ctx.lineTo(30, 10+tol);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.lineTo(90+tol, 20);
-ctx.lineTo(80, 10-tol);
-ctx.fill();
-
-_assertPixel(canvas, 34,16, 0,255,0,255);
-_assertPixel(canvas, 34,15, 0,255,0,255);
-_assertPixel(canvas, 35,15, 0,255,0,255);
-_assertPixel(canvas, 36,15, 0,255,0,255);
-_assertPixel(canvas, 36,14, 0,255,0,255);
-
-_assertPixel(canvas, 84,16, 0,255,0,255);
-_assertPixel(canvas, 84,15, 0,255,0,255);
-_assertPixel(canvas, 85,15, 0,255,0,255);
-_assertPixel(canvas, 86,15, 0,255,0,255);
-_assertPixel(canvas, 86,14, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'bevel';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.lineTo(40-tol, 20);
+ ctx.lineTo(30, 10+tol);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.lineTo(90+tol, 20);
+ ctx.lineTo(80, 10-tol);
+ ctx.fill();
+
+ _assertPixel(canvas, 34,16, 0,255,0,255);
+ _assertPixel(canvas, 34,15, 0,255,0,255);
+ _assertPixel(canvas, 35,15, 0,255,0,255);
+ _assertPixel(canvas, 36,15, 0,255,0,255);
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+
+ _assertPixel(canvas, 84,16, 0,255,0,255);
+ _assertPixel(canvas, 84,15, 0,255,0,255);
+ _assertPixel(canvas, 85,15, 0,255,0,255);
+ _assertPixel(canvas, 86,15, 0,255,0,255);
+ _assertPixel(canvas, 86,14, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html
index a999e73d0a8..60650adeb3f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.html
@@ -15,33 +15,31 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js
index cc7073fadba..48823119618 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.closed.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
index f941c69e3dc..be1f7e393e6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.html
@@ -15,40 +15,38 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'invalid';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'invalid';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'ROUND';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'ROUND';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round\0';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round\0';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round ';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round ';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = "";
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = "";
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'butt';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-})(canvas, ctx);
-t.done();
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'butt';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js
index fa19bd70b0c..aa5a35c0c50 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.invalid.worker.js
@@ -13,36 +13,35 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'invalid';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'invalid';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'ROUND';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'ROUND';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round\0';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round\0';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'round ';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'round ';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = "";
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-
-ctx.lineJoin = 'bevel';
-ctx.lineJoin = 'butt';
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-t.done();
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = "";
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel';
+ ctx.lineJoin = 'butt';
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html
index e31ef139fb1..c26e883c40a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.html
@@ -15,59 +15,57 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 20;
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillRect(10, 10, 30, 20);
-ctx.fillRect(20, 10, 20, 30);
+ ctx.fillRect(10, 10, 30, 20);
+ ctx.fillRect(20, 10, 20, 30);
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
-ctx.fillRect(60, 10, 30, 20);
-ctx.fillRect(70, 10, 20, 30);
+ ctx.fillRect(60, 10, 30, 20);
+ ctx.fillRect(70, 10, 20, 30);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-_assertPixel(canvas, 39,11, 0,255,0,255);
-_assertPixel(canvas, 40,10, 0,255,0,255);
-_assertPixel(canvas, 41,9, 0,255,0,255);
-_assertPixel(canvas, 42,8, 0,255,0,255);
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+ _assertPixel(canvas, 39,11, 0,255,0,255);
+ _assertPixel(canvas, 40,10, 0,255,0,255);
+ _assertPixel(canvas, 41,9, 0,255,0,255);
+ _assertPixel(canvas, 42,8, 0,255,0,255);
-_assertPixel(canvas, 88,12, 0,255,0,255);
-_assertPixel(canvas, 89,11, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 91,9, 0,255,0,255);
-_assertPixel(canvas, 92,8, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 88,12, 0,255,0,255);
+ _assertPixel(canvas, 89,11, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 91,9, 0,255,0,255);
+ _assertPixel(canvas, 92,8, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js
index 3a3eb8f86f2..7b700001000 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.miter.worker.js
@@ -13,55 +13,54 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 20;
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 20;
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
-ctx.fillRect(10, 10, 30, 20);
-ctx.fillRect(20, 10, 20, 30);
+ ctx.fillRect(10, 10, 30, 20);
+ ctx.fillRect(20, 10, 20, 30);
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
-ctx.fillRect(60, 10, 30, 20);
-ctx.fillRect(70, 10, 20, 30);
+ ctx.fillRect(60, 10, 30, 20);
+ ctx.fillRect(70, 10, 20, 30);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-_assertPixel(canvas, 39,11, 0,255,0,255);
-_assertPixel(canvas, 40,10, 0,255,0,255);
-_assertPixel(canvas, 41,9, 0,255,0,255);
-_assertPixel(canvas, 42,8, 0,255,0,255);
-
-_assertPixel(canvas, 88,12, 0,255,0,255);
-_assertPixel(canvas, 89,11, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 91,9, 0,255,0,255);
-_assertPixel(canvas, 92,8, 0,255,0,255);
-t.done();
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+ _assertPixel(canvas, 39,11, 0,255,0,255);
+ _assertPixel(canvas, 40,10, 0,255,0,255);
+ _assertPixel(canvas, 41,9, 0,255,0,255);
+ _assertPixel(canvas, 42,8, 0,255,0,255);
+ _assertPixel(canvas, 88,12, 0,255,0,255);
+ _assertPixel(canvas, 89,11, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 91,9, 0,255,0,255);
+ _assertPixel(canvas, 92,8, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.html
index b6a3901a9e4..d801e5c367d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.html
@@ -15,33 +15,31 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.lineTo(100, 50);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js
index 5f52b6337ad..2a1242436d4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.open.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineJoin = 'miter';
-ctx.lineWidth = 200;
-
-ctx.beginPath();
-ctx.moveTo(100, 50);
-ctx.lineTo(100, 1000);
-ctx.lineTo(1000, 1000);
-ctx.lineTo(1000, 50);
-ctx.lineTo(100, 50);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+
+ ctx.beginPath();
+ ctx.moveTo(100, 50);
+ ctx.lineTo(100, 1000);
+ ctx.lineTo(1000, 1000);
+ ctx.lineTo(1000, 50);
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
index aaba8e44328..0826406b9df 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.html
@@ -15,30 +15,28 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 300;
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.lineTo(0, 25);
-ctx.lineTo(-100, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 300;
+ ctx.lineJoin = 'round';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(-100, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js
index d431d5e99f5..f5b67dc5a26 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.parallel.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 300;
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.lineTo(0, 25);
-ctx.lineTo(-100, 25);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 300;
+ ctx.lineJoin = 'round';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(-100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.html
index 5f413373cb5..70f6a8e5179 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.html
@@ -15,66 +15,64 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'round';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-_assertPixel(canvas, 36,14, 0,255,0,255);
-_assertPixel(canvas, 36,13, 0,255,0,255);
-_assertPixel(canvas, 37,13, 0,255,0,255);
-_assertPixel(canvas, 38,13, 0,255,0,255);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-
-_assertPixel(canvas, 86,14, 0,255,0,255);
-_assertPixel(canvas, 86,13, 0,255,0,255);
-_assertPixel(canvas, 87,13, 0,255,0,255);
-_assertPixel(canvas, 88,13, 0,255,0,255);
-_assertPixel(canvas, 88,12, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'round';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+ _assertPixel(canvas, 36,13, 0,255,0,255);
+ _assertPixel(canvas, 37,13, 0,255,0,255);
+ _assertPixel(canvas, 38,13, 0,255,0,255);
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+
+ _assertPixel(canvas, 86,14, 0,255,0,255);
+ _assertPixel(canvas, 86,13, 0,255,0,255);
+ _assertPixel(canvas, 87,13, 0,255,0,255);
+ _assertPixel(canvas, 88,13, 0,255,0,255);
+ _assertPixel(canvas, 88,12, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js
index 44a847bd30c..33b135d6046 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.round.worker.js
@@ -13,62 +13,61 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-var tol = 1; // tolerance to avoid antialiasing artifacts
-
-ctx.lineJoin = 'round';
-ctx.lineWidth = 20;
-
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-
-ctx.fillRect(10, 10, 20, 20);
-ctx.fillRect(20, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(30, 20);
-ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-ctx.beginPath();
-ctx.moveTo(10, 20);
-ctx.lineTo(30, 20);
-ctx.lineTo(30, 40);
-ctx.stroke();
-
-
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-
-ctx.beginPath();
-ctx.moveTo(60, 20);
-ctx.lineTo(80, 20);
-ctx.lineTo(80, 40);
-ctx.stroke();
-
-ctx.fillRect(60, 10, 20, 20);
-ctx.fillRect(70, 20, 20, 20);
-ctx.beginPath();
-ctx.moveTo(80, 20);
-ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
-ctx.fill();
-
-_assertPixel(canvas, 36,14, 0,255,0,255);
-_assertPixel(canvas, 36,13, 0,255,0,255);
-_assertPixel(canvas, 37,13, 0,255,0,255);
-_assertPixel(canvas, 38,13, 0,255,0,255);
-_assertPixel(canvas, 38,12, 0,255,0,255);
-
-_assertPixel(canvas, 86,14, 0,255,0,255);
-_assertPixel(canvas, 86,13, 0,255,0,255);
-_assertPixel(canvas, 87,13, 0,255,0,255);
-_assertPixel(canvas, 88,13, 0,255,0,255);
-_assertPixel(canvas, 88,12, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ var tol = 1; // tolerance to avoid antialiasing artifacts
+
+ ctx.lineJoin = 'round';
+ ctx.lineWidth = 20;
+
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+
+ ctx.fillRect(10, 10, 20, 20);
+ ctx.fillRect(20, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(30, 20);
+ ctx.arc(30, 20, 10-tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.moveTo(10, 20);
+ ctx.lineTo(30, 20);
+ ctx.lineTo(30, 40);
+ ctx.stroke();
+
+
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+
+ ctx.beginPath();
+ ctx.moveTo(60, 20);
+ ctx.lineTo(80, 20);
+ ctx.lineTo(80, 40);
+ ctx.stroke();
+
+ ctx.fillRect(60, 10, 20, 20);
+ ctx.fillRect(70, 20, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(80, 20);
+ ctx.arc(80, 20, 10+tol, 0, 2*Math.PI, true);
+ ctx.fill();
+
+ _assertPixel(canvas, 36,14, 0,255,0,255);
+ _assertPixel(canvas, 36,13, 0,255,0,255);
+ _assertPixel(canvas, 37,13, 0,255,0,255);
+ _assertPixel(canvas, 38,13, 0,255,0,255);
+ _assertPixel(canvas, 38,12, 0,255,0,255);
+
+ _assertPixel(canvas, 86,14, 0,255,0,255);
+ _assertPixel(canvas, 86,13, 0,255,0,255);
+ _assertPixel(canvas, 87,13, 0,255,0,255);
+ _assertPixel(canvas, 88,13, 0,255,0,255);
+ _assertPixel(canvas, 88,12, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html
index 1ea992c7063..3b3935d1f71 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'round';
-_assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
+ ctx.lineJoin = 'round';
+ _assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
-ctx.lineJoin = 'miter';
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-})(canvas, ctx);
-t.done();
+ ctx.lineJoin = 'miter';
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js
index 407dbdd59e0..d1bdfd88456 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.join.valid.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineJoin = 'bevel'
-_assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
+ ctx.lineJoin = 'bevel'
+ _assertSame(ctx.lineJoin, 'bevel', "ctx.lineJoin", "'bevel'");
-ctx.lineJoin = 'round';
-_assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
-
-ctx.lineJoin = 'miter';
-_assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
-t.done();
+ ctx.lineJoin = 'round';
+ _assertSame(ctx.lineJoin, 'round', "ctx.lineJoin", "'round'");
+ ctx.lineJoin = 'miter';
+ _assertSame(ctx.lineJoin, 'miter', "ctx.lineJoin", "'miter'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
index db8e4f84264..587062ed12c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.html
@@ -15,40 +15,38 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 2.614;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 2.613;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 2.614;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 2.613;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js
index 95040d13194..0ab5c9050cd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.acute.worker.js
@@ -13,36 +13,35 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 2.614;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 2.613;
-ctx.beginPath();
-ctx.moveTo(100, 1000);
-ctx.lineTo(100, 100);
-ctx.lineTo(1000, 1000);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 2.614;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 2.613;
+ ctx.beginPath();
+ ctx.moveTo(100, 1000);
+ ctx.lineTo(100, 100);
+ ctx.lineTo(1000, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
index 828af67835c..1ae5c55aef5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js
index e2b04e21f63..41c4716c889 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.exceeded.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201); // slightly non-right-angle to avoid being a special case
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
index 42d5d927d76..eacd95b811b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.html
@@ -15,48 +15,46 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 0;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 0;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -1;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -1;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = NaN;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = NaN;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 'string';
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 'string';
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = true;
-_assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = true;
+ _assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = false;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-})(canvas, ctx);
-t.done();
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = false;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js
index dbc64d52d94..62f250670c4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.invalid.worker.js
@@ -13,44 +13,43 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 0;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 0;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -1;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -1;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = -Infinity;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = -Infinity;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = NaN;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = NaN;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = 'string';
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = 'string';
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = 1.5;
-ctx.miterLimit = true;
-_assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
-
-ctx.miterLimit = 1.5;
-ctx.miterLimit = false;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-t.done();
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = true;
+ _assertSame(ctx.miterLimit, 1, "ctx.miterLimit", "1");
+ ctx.miterLimit = 1.5;
+ ctx.miterLimit = false;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
index 89f4c032554..bad3cedc0ea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.html
@@ -15,29 +15,27 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.strokeRect(100, 25, 200, 0);
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.strokeRect(100, 25, 200, 0);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js
index 24f4fa30f5e..2b61bc8975b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.lineedge.worker.js
@@ -13,25 +13,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.strokeRect(100, 25, 200, 0);
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.strokeRect(100, 25, 200, 0);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
index 69acc7e7bad..efab533fbab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.html
@@ -15,40 +15,38 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 1600;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.083;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.082;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 1600;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.083;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.082;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js
index 45900dbc88a..42b1cd37b11 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.obtuse.worker.js
@@ -13,36 +13,35 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 1600;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.083;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.082;
-ctx.beginPath();
-ctx.moveTo(800, 10000);
-ctx.lineTo(800, 300);
-ctx.lineTo(10000, -8900);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 1600;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.083;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.082;
+ ctx.beginPath();
+ ctx.moveTo(800, 10000);
+ ctx.lineTo(800, 300);
+ ctx.lineTo(10000, -8900);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
index 980f8a74b8b..5bb4e63230c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js
index a2a07247b1e..42e995deedc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.rightangle.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#f00';
-ctx.miterLimit = 1.414;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 200);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#f00';
+ ctx.miterLimit = 1.414;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 200);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
index 1cf07cfbb3c..3c569ea6558 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = "1e1";
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+ ctx.miterLimit = "1e1";
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-ctx.miterLimit = 1/1024;
-_assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
+ ctx.miterLimit = 1/1024;
+ _assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
-ctx.miterLimit = 1000;
-_assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
-})(canvas, ctx);
-t.done();
+ ctx.miterLimit = 1000;
+ _assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js
index c71c726f126..cb0548abd08 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.valid.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.miterLimit = 1.5;
-_assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
+ ctx.miterLimit = 1.5;
+ _assertSame(ctx.miterLimit, 1.5, "ctx.miterLimit", "1.5");
-ctx.miterLimit = "1e1";
-_assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
+ ctx.miterLimit = "1e1";
+ _assertSame(ctx.miterLimit, 10, "ctx.miterLimit", "10");
-ctx.miterLimit = 1/1024;
-_assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
-
-ctx.miterLimit = 1000;
-_assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
-t.done();
+ ctx.miterLimit = 1/1024;
+ _assertSame(ctx.miterLimit, 1/1024, "ctx.miterLimit", "1/1024");
+ ctx.miterLimit = 1000;
+ _assertSame(ctx.miterLimit, 1000, "ctx.miterLimit", "1000");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html
index 150953cf766..da87cf4a294 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.416;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.416;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js
index c09ad957e89..1d9aacb817b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.miter.within.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-
-ctx.strokeStyle = '#0f0';
-ctx.miterLimit = 1.416;
-ctx.beginPath();
-ctx.moveTo(200, 1000);
-ctx.lineTo(200, 200);
-ctx.lineTo(1000, 201);
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.miterLimit = 1.416;
+ ctx.beginPath();
+ ctx.moveTo(200, 1000);
+ ctx.lineTo(200, 200);
+ ctx.lineTo(1000, 201);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.html
index 69e42b7a8d3..d3d13ece092 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.html
@@ -15,34 +15,32 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 24);
-ctx.lineTo(100, 25);
-ctx.lineTo(0, 26);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 24);
+ ctx.lineTo(100, 25);
+ ctx.lineTo(0, 26);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js
index 02ebbfd8af0..f2c7b2c4ceb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.union.worker.js
@@ -13,30 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 24);
-ctx.lineTo(100, 25);
-ctx.lineTo(0, 26);
-ctx.closePath();
-ctx.stroke();
-
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 25,1, 0,255,0,255);
-_assertPixel(canvas, 48,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 24);
+ ctx.lineTo(100, 25);
+ ctx.lineTo(0, 26);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 25,1, 0,255,0,255);
+ _assertPixel(canvas, 48,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html
index 9b087ce8d34..88e38294bfa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.html
@@ -15,51 +15,49 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 20;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
-
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 20;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
+
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js
index d0664278979..012d9b11bd7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.basic.worker.js
@@ -13,47 +13,46 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.lineWidth = 20;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.beginPath();
-ctx.moveTo(25, 15);
-ctx.lineTo(25, 35);
-ctx.stroke();
-
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(75, 15);
-ctx.lineTo(75, 35);
-ctx.stroke();
-ctx.fillRect(65, 15, 20, 20);
-
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
-
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 20;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.beginPath();
+ ctx.moveTo(25, 15);
+ ctx.lineTo(25, 35);
+ ctx.stroke();
+
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(75, 15);
+ ctx.lineTo(75, 35);
+ ctx.stroke();
+ ctx.fillRect(65, 15, 20, 20);
+
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
+
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
index 0651b3f6a5e..481a3168229 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.html
@@ -15,48 +15,46 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 0;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 0;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -1;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -1;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = NaN;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = NaN;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 'string';
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 'string';
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = true;
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = true;
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = false;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-})(canvas, ctx);
-t.done();
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = false;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js
index dc5e2c29263..3a10cb48e85 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.invalid.worker.js
@@ -13,44 +13,43 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 0;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 0;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -1;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -1;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = -Infinity;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = -Infinity;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = NaN;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = NaN;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = 'string';
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = 'string';
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = 1.5;
-ctx.lineWidth = true;
-_assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
-
-ctx.lineWidth = 1.5;
-ctx.lineWidth = false;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-t.done();
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = true;
+ _assertSame(ctx.lineWidth, 1, "ctx.lineWidth", "1");
+ ctx.lineWidth = 1.5;
+ ctx.lineWidth = false;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
index 120360607f9..9ac77a9c49e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.html
@@ -15,28 +15,26 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(50, 50);
-ctx.strokeStyle = '#0f0';
-ctx.moveTo(0, 0.5);
-ctx.lineTo(2, 0.5);
-ctx.stroke();
-
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 50,5, 0,255,0,255);
-_assertPixel(canvas, 50,45, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.scale(50, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.moveTo(0, 0.5);
+ ctx.lineTo(2, 0.5);
+ ctx.stroke();
+
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 50,5, 0,255,0,255);
+ _assertPixel(canvas, 50,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js
index a692f4cc113..8d8089476bb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.scaledefault.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.scale(50, 50);
-ctx.strokeStyle = '#0f0';
-ctx.moveTo(0, 0.5);
-ctx.lineTo(2, 0.5);
-ctx.stroke();
-
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 50,5, 0,255,0,255);
-_assertPixel(canvas, 50,45, 0,255,0,255);
-t.done();
+ ctx.scale(50, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.moveTo(0, 0.5);
+ ctx.lineTo(2, 0.5);
+ ctx.stroke();
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 50,5, 0,255,0,255);
+ _assertPixel(canvas, 50,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
index d2358ba2e84..ea8f285dc42 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.html
@@ -15,57 +15,55 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 4;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.save();
- ctx.scale(5, 1);
- ctx.beginPath();
- ctx.moveTo(5, 15);
- ctx.lineTo(5, 35);
- ctx.stroke();
-ctx.restore();
+ ctx.lineWidth = 4;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.save();
+ ctx.scale(5, 1);
+ ctx.beginPath();
+ ctx.moveTo(5, 15);
+ ctx.lineTo(5, 35);
+ ctx.stroke();
+ ctx.restore();
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.save();
- ctx.scale(-5, 1);
- ctx.beginPath();
- ctx.moveTo(-15, 15);
- ctx.lineTo(-15, 35);
- ctx.stroke();
-ctx.restore();
-ctx.fillRect(65, 15, 20, 20);
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.save();
+ ctx.scale(-5, 1);
+ ctx.beginPath();
+ ctx.moveTo(-15, 15);
+ ctx.lineTo(-15, 35);
+ ctx.stroke();
+ ctx.restore();
+ ctx.fillRect(65, 15, 20, 20);
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js
index e26e93b1e4f..67fc0a29bd4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.transformed.worker.js
@@ -13,53 +13,52 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 4;
-// Draw a green line over a red box, to check the line is not too small
-ctx.fillStyle = '#f00';
-ctx.strokeStyle = '#0f0';
-ctx.fillRect(15, 15, 20, 20);
-ctx.save();
- ctx.scale(5, 1);
- ctx.beginPath();
- ctx.moveTo(5, 15);
- ctx.lineTo(5, 35);
- ctx.stroke();
-ctx.restore();
+ ctx.lineWidth = 4;
+ // Draw a green line over a red box, to check the line is not too small
+ ctx.fillStyle = '#f00';
+ ctx.strokeStyle = '#0f0';
+ ctx.fillRect(15, 15, 20, 20);
+ ctx.save();
+ ctx.scale(5, 1);
+ ctx.beginPath();
+ ctx.moveTo(5, 15);
+ ctx.lineTo(5, 35);
+ ctx.stroke();
+ ctx.restore();
-// Draw a green box over a red line, to check the line is not too large
-ctx.fillStyle = '#0f0';
-ctx.strokeStyle = '#f00';
-ctx.save();
- ctx.scale(-5, 1);
- ctx.beginPath();
- ctx.moveTo(-15, 15);
- ctx.lineTo(-15, 35);
- ctx.stroke();
-ctx.restore();
-ctx.fillRect(65, 15, 20, 20);
+ // Draw a green box over a red line, to check the line is not too large
+ ctx.fillStyle = '#0f0';
+ ctx.strokeStyle = '#f00';
+ ctx.save();
+ ctx.scale(-5, 1);
+ ctx.beginPath();
+ ctx.moveTo(-15, 15);
+ ctx.lineTo(-15, 35);
+ ctx.stroke();
+ ctx.restore();
+ ctx.fillRect(65, 15, 20, 20);
-_assertPixel(canvas, 14,25, 0,255,0,255);
-_assertPixel(canvas, 15,25, 0,255,0,255);
-_assertPixel(canvas, 16,25, 0,255,0,255);
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 34,25, 0,255,0,255);
-_assertPixel(canvas, 35,25, 0,255,0,255);
-_assertPixel(canvas, 36,25, 0,255,0,255);
-
-_assertPixel(canvas, 64,25, 0,255,0,255);
-_assertPixel(canvas, 65,25, 0,255,0,255);
-_assertPixel(canvas, 66,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-_assertPixel(canvas, 84,25, 0,255,0,255);
-_assertPixel(canvas, 85,25, 0,255,0,255);
-_assertPixel(canvas, 86,25, 0,255,0,255);
-t.done();
+ _assertPixel(canvas, 14,25, 0,255,0,255);
+ _assertPixel(canvas, 15,25, 0,255,0,255);
+ _assertPixel(canvas, 16,25, 0,255,0,255);
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 34,25, 0,255,0,255);
+ _assertPixel(canvas, 35,25, 0,255,0,255);
+ _assertPixel(canvas, 36,25, 0,255,0,255);
+ _assertPixel(canvas, 64,25, 0,255,0,255);
+ _assertPixel(canvas, 65,25, 0,255,0,255);
+ _assertPixel(canvas, 66,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ _assertPixel(canvas, 84,25, 0,255,0,255);
+ _assertPixel(canvas, 85,25, 0,255,0,255);
+ _assertPixel(canvas, 86,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html
index 4a4563c4e35..813433da3f8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = "1e1";
-_assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
+ ctx.lineWidth = "1e1";
+ _assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
-ctx.lineWidth = 1/1024;
-_assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
+ ctx.lineWidth = 1/1024;
+ _assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
-ctx.lineWidth = 1000;
-_assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
-})(canvas, ctx);
-t.done();
+ ctx.lineWidth = 1000;
+ _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js
index df6ee9838e8..195575f7de4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/line-styles/2d.line.width.valid.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.lineWidth = 1.5;
-_assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
+ ctx.lineWidth = 1.5;
+ _assertSame(ctx.lineWidth, 1.5, "ctx.lineWidth", "1.5");
-ctx.lineWidth = "1e1";
-_assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
+ ctx.lineWidth = "1e1";
+ _assertSame(ctx.lineWidth, 10, "ctx.lineWidth", "10");
-ctx.lineWidth = 1/1024;
-_assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
-
-ctx.lineWidth = 1000;
-_assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
-t.done();
+ ctx.lineWidth = 1/1024;
+ _assertSame(ctx.lineWidth, 1/1024, "ctx.lineWidth", "1/1024");
+ ctx.lineWidth = 1000;
+ _assertSame(ctx.lineWidth, 1000, "ctx.lineWidth", "1000");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html
index cf358e38fc1..bdd2c7a65fe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js
index 5a1f54c4c2f..1b6a534c23b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html
index 9b3983fb370..c92e83abd7a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js
index 15bf295b2d5..25598c959d6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html
index a757b31efba..86170ac8c56 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js
index 646349fb99f..6841041d784 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.3.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html
index b8e4d54027d..e694b99f707 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.html
@@ -17,21 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js
index 8fa2ef137d7..502175165ff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.4.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html
index f13a2e41c96..7f0d9af19f5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js
index 50b23cd9ba8..aa2320a92a5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.5.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html
index 88184b8d77d..64cf6daeef8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.html
@@ -17,21 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js
index 38bd40489ba..929db397d3a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.angle.6.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html
index 848f20c32fa..ee42c040852 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js
index c73829a0eee..da74713e4ab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.default.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 0);
-ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 0);
+ ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html
index 9098b7fe023..25414647b21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js
index 82281ea4b08..9b1fbb1a387 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.empty.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html
index 12be27afa66..b8459053f2e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(-100, 0);
-ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(-100, 0);
+ ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js
index a2519f0bad0..963640a2735 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.end.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(-100, 0);
-ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(-100, 0);
+ ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html
index 77f1b07bf5c..6c81b9e0ded 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.html
@@ -17,11 +17,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
-t.done();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arc(10, 10, -5, 0, 1, false); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js
index c1abffa8e9e..b48eb984742 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.negative.worker.js
@@ -13,11 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arc(0, 0, -1, 0, 0, true); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arc(10, 10, -5, 0, 1, false); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html
index 542940435af..4d9ebe6d874 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js
index 1d7de774868..af6b4c98538 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonempty.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html
index c65af631b54..b347a1e27ad 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.html
@@ -17,61 +17,61 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
-ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
-ctx.arc(0, 0, 50, 0, Infinity, true);
-ctx.arc(0, 0, 50, 0, -Infinity, true);
-ctx.arc(0, 0, 50, 0, NaN, true);
-ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, 50, 0, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(0, Infinity, 50, 0, Infinity, true);
-ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(0, 0, Infinity, 0, Infinity, true);
-ctx.arc(0, 0, 50, Infinity, Infinity, true);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, 0, Infinity, true);
+ ctx.arc(0, 0, 50, 0, -Infinity, true);
+ ctx.arc(0, 0, 50, 0, NaN, true);
+ ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, 50, 0, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, 50, 0, Infinity, true);
+ ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, 0, Infinity, 0, Infinity, true);
+ ctx.arc(0, 0, 50, Infinity, Infinity, true);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js
index f83dcf1080d..50ff560e349 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.nonfinite.worker.js
@@ -13,61 +13,60 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
-ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
-ctx.arc(0, 0, 50, 0, Infinity, true);
-ctx.arc(0, 0, 50, 0, -Infinity, true);
-ctx.arc(0, 0, 50, 0, NaN, true);
-ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
-ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
-ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
-ctx.arc(Infinity, 0, 50, 0, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
-ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
-ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
-ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
-ctx.arc(0, Infinity, 50, 0, Infinity, true);
-ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
-ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
-ctx.arc(0, 0, Infinity, 0, Infinity, true);
-ctx.arc(0, 0, 50, Infinity, Infinity, true);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arc(Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(-Infinity, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(NaN, 0, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, -Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, NaN, 50, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, -Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, NaN, 0, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, -Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, NaN, 2*Math.PI, true);
+ ctx.arc(0, 0, 50, 0, Infinity, true);
+ ctx.arc(0, 0, 50, 0, -Infinity, true);
+ ctx.arc(0, 0, 50, 0, NaN, true);
+ ctx.arc(Infinity, Infinity, 50, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, Infinity, 50, 0, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, Infinity, 0, Infinity, true);
+ ctx.arc(Infinity, 0, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(Infinity, 0, 50, Infinity, Infinity, true);
+ ctx.arc(Infinity, 0, 50, 0, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, Infinity, 0, Infinity, true);
+ ctx.arc(0, Infinity, 50, Infinity, 2*Math.PI, true);
+ ctx.arc(0, Infinity, 50, Infinity, Infinity, true);
+ ctx.arc(0, Infinity, 50, 0, Infinity, true);
+ ctx.arc(0, 0, Infinity, Infinity, 2*Math.PI, true);
+ ctx.arc(0, 0, Infinity, Infinity, Infinity, true);
+ ctx.arc(0, 0, Infinity, 0, Infinity, true);
+ ctx.arc(0, 0, 50, Infinity, Infinity, true);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html
index 3b0aed390f5..bf8a6f1f915 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.html
@@ -17,37 +17,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(2, 0.5);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
-ctx.fill();
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-25, 50);
-ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(75, 50);
-ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, -25);
-ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, 125);
-ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 0.5);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+ ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-25, 50);
+ ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(75, 50);
+ ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, -25);
+ ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, 125);
+ ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js
index ec300985c8a..5d9619a920f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.1.worker.js
@@ -13,37 +13,37 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(2, 0.5);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
-ctx.fill();
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-25, 50);
-ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(75, 50);
-ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, -25);
-ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
-ctx.moveTo(25, 125);
-ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 0.5);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
+ ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-25, 50);
+ ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(75, 50);
+ ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, -25);
+ ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
+ ctx.moveTo(25, 125);
+ ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
+ ctx.fill();
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html
index f6822f8203f..95376882cd3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.html
@@ -17,27 +17,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(100, 100);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 1.2;
-ctx.beginPath();
-ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,25, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(100, 100);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 1.2;
+ ctx.beginPath();
+ ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,25, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js
index d946f7f0fee..c655dad30f8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.scale.2.worker.js
@@ -13,27 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(100, 100);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 1.2;
-ctx.beginPath();
-ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,25, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(100, 100);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 1.2;
+ ctx.beginPath();
+ ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,25, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html
index 9e8803a102d..624b307af72 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.html
@@ -17,22 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js
index 84cb983f1aa..6c77dbd5b19 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.1.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html
index f2118ef29b8..b49aa2437aa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 180;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 97,1, 0,255,0,255);
-_assertPixel(canvas, 97,2, 0,255,0,255);
-_assertPixel(canvas, 97,3, 0,255,0,255);
-_assertPixel(canvas, 2,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 180;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 97,1, 0,255,0,255);
+ _assertPixel(canvas, 97,2, 0,255,0,255);
+ _assertPixel(canvas, 97,3, 0,255,0,255);
+ _assertPixel(canvas, 2,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js
index be7f13aee7e..2bbdacd46de 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.selfintersect.2.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 180;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-ctx.beginPath();
-ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 97,1, 0,255,0,255);
-_assertPixel(canvas, 97,2, 0,255,0,255);
-_assertPixel(canvas, 97,3, 0,255,0,255);
-_assertPixel(canvas, 2,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 180;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ ctx.beginPath();
+ ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 97,1, 0,255,0,255);
+ _assertPixel(canvas, 97,2, 0,255,0,255);
+ _assertPixel(canvas, 97,3, 0,255,0,255);
+ _assertPixel(canvas, 2,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html
index 42242536e2b..ceb3cb380cb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js
index b41863bfb7b..e1058ae96dc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.1.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html
index 1e33a024163..a39fd039476 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js
index d5d6cb7b7e3..d444d9b04eb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.2.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(50, 50, 50, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 20,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(50, 50, 50, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 20,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html
index b90284e5798..853814aef21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.html
@@ -17,22 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js
index 5d0cf805399..b8008e778b0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.3.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 100;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 100;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html
index dce9547a6b4..e6221947dff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.html
@@ -17,22 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 150;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 150;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js
index 8bd028b0bd1..9174641c20d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.4.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 150;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 150;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html
index bd7e54af3b9..968a1c58c08 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.html
@@ -17,22 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js
index 0584590afb3..7f40e4341ab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.shape.5.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 200;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 200;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html
index ddf200c88b5..ced1207a9b3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js
index c56d25c70ba..e9abf086e0c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html
index 0a9e0c782a6..4948b10f2fa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js
index 5db75de2a26..5e9c51e5e3f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html
index df1e45480d4..c4036fc06e7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js
index 0c984884c9a..ad72fbd0aff 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.3.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html
index 8afa122c7c2..392f00e652f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js
index 3158528f657..15d799209c3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.twopie.4.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html
index f26162f2238..5757ab3ddf7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js
index efb137a92af..5a6d35f6915 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, true);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html
index f2eda4b8a2d..69f8472443a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js
index 28f4f3759af..a285462fc06 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zero.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.arc(50, 25, 50, 0, 0, false);
-ctx.stroke();
-_assertPixel(canvas, 50,20, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.arc(50, 25, 50, 0, 0, false);
+ ctx.stroke();
+ _assertPixel(canvas, 50,20, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html
index 2d56e369b89..7303b7dc1c6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00'
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 0, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00'
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 0, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js
index c57046ab94d..183acc1bbbb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arc.zeroradius.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00'
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arc(200, 25, 0, 0, Math.PI, true);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00'
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arc(200, 25, 0, 0, Math.PI, true);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html
index 58b26356991..e7558d628fb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.html
@@ -17,27 +17,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(0, 25, 50, 1000, 1);
-ctx.lineTo(100, 25);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(0, 25, 50, 1000, 1);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js
index 44926712fcf..80a74c6d911 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.1.worker.js
@@ -13,27 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(0, 25, 50, 1000, 1);
-ctx.lineTo(100, 25);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(0, 25, 50, 1000, 1);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html
index d85e310c852..18ac31524d1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.html
@@ -17,19 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js
index c8b336a494e..a35ffe6977a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.coincide.2.worker.js
@@ -13,19 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 25, 1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html
index 5531ca62ae0..b9bcc7b2380 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.html
@@ -17,24 +17,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 200, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 200, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js
index 3864a311db3..a814b1af070 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.1.worker.js
@@ -13,24 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 200, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, 100, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 200, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, 100, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html
index a78d626ef0a..f51a7af206a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.html
@@ -17,24 +17,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 10, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 110, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 10, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 110, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js
index 6f4c2aa8c65..ba9a75ed4e6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.2.worker.js
@@ -13,24 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 10, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 110, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 10, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 110, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html
index f2d52e42417..568d0f8f2b6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.html
@@ -17,28 +17,32 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 0, 25, 1);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, -200, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 0, 25, 1);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, -200, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js
index 2d152b0d83f..8087909cb7c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.collinear.3.worker.js
@@ -13,28 +13,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 1);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 0, 25, 1);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(-100, 25);
-ctx.arcTo(0, 25, -200, 25, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 1);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 0, 25, 1);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(-100, 25);
+ ctx.arcTo(0, 25, -200, 25, 1);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html
index 81dc7b1bd81..ec1bd0399dc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arcTo(100, 50, 200, 50, 0.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arcTo(100, 50, 200, 50, 0.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js
index 99354ac735a..74d71b6253f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.arcTo(100, 50, 200, 50, 0.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.arcTo(100, 50, 200, 50, 0.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html
index 43c9aec2941..60ee458524e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js
index aad3d006c99..76790925afb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.ensuresubpath.2.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html
index 59cf9739777..c35e293a6fa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.html
@@ -17,11 +17,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
-t.done();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arcTo(10, 10, 20, 20, -5); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js
index 60813e88bc3..104e7a63873 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.negative.worker.js
@@ -13,11 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.arcTo(0, 0, 0, 0, -1); });
+ var path = new Path2D();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { path.arcTo(10, 10, 20, 20, -5); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html
index 982ad4a9648..9d2256d79c9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.html
@@ -17,59 +17,59 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arcTo(Infinity, 50, 0, 50, 0);
-ctx.arcTo(-Infinity, 50, 0, 50, 0);
-ctx.arcTo(NaN, 50, 0, 50, 0);
-ctx.arcTo(0, Infinity, 0, 50, 0);
-ctx.arcTo(0, -Infinity, 0, 50, 0);
-ctx.arcTo(0, NaN, 0, 50, 0);
-ctx.arcTo(0, 50, Infinity, 50, 0);
-ctx.arcTo(0, 50, -Infinity, 50, 0);
-ctx.arcTo(0, 50, NaN, 50, 0);
-ctx.arcTo(0, 50, 0, Infinity, 0);
-ctx.arcTo(0, 50, 0, -Infinity, 0);
-ctx.arcTo(0, 50, 0, NaN, 0);
-ctx.arcTo(0, 50, 0, 50, Infinity);
-ctx.arcTo(0, 50, 0, 50, -Infinity);
-ctx.arcTo(0, 50, 0, 50, NaN);
-ctx.arcTo(Infinity, Infinity, 0, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, 50, 0, Infinity, 0);
-ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, 0, 50, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(0, Infinity, 0, Infinity, 0);
-ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(0, Infinity, 0, 50, Infinity);
-ctx.arcTo(0, 50, Infinity, Infinity, 0);
-ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(0, 50, Infinity, 50, Infinity);
-ctx.arcTo(0, 50, 0, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arcTo(Infinity, 50, 0, 50, 0);
+ ctx.arcTo(-Infinity, 50, 0, 50, 0);
+ ctx.arcTo(NaN, 50, 0, 50, 0);
+ ctx.arcTo(0, Infinity, 0, 50, 0);
+ ctx.arcTo(0, -Infinity, 0, 50, 0);
+ ctx.arcTo(0, NaN, 0, 50, 0);
+ ctx.arcTo(0, 50, Infinity, 50, 0);
+ ctx.arcTo(0, 50, -Infinity, 50, 0);
+ ctx.arcTo(0, 50, NaN, 50, 0);
+ ctx.arcTo(0, 50, 0, Infinity, 0);
+ ctx.arcTo(0, 50, 0, -Infinity, 0);
+ ctx.arcTo(0, 50, 0, NaN, 0);
+ ctx.arcTo(0, 50, 0, 50, Infinity);
+ ctx.arcTo(0, 50, 0, 50, -Infinity);
+ ctx.arcTo(0, 50, 0, 50, NaN);
+ ctx.arcTo(Infinity, Infinity, 0, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, 50, 0, Infinity, 0);
+ ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, 0, 50, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(0, Infinity, 0, Infinity, 0);
+ ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, 0, 50, Infinity);
+ ctx.arcTo(0, 50, Infinity, Infinity, 0);
+ ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, 50, Infinity, 50, Infinity);
+ ctx.arcTo(0, 50, 0, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js
index 6aa674fc90d..1d2c913cfe4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.nonfinite.worker.js
@@ -13,59 +13,58 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.arcTo(Infinity, 50, 0, 50, 0);
-ctx.arcTo(-Infinity, 50, 0, 50, 0);
-ctx.arcTo(NaN, 50, 0, 50, 0);
-ctx.arcTo(0, Infinity, 0, 50, 0);
-ctx.arcTo(0, -Infinity, 0, 50, 0);
-ctx.arcTo(0, NaN, 0, 50, 0);
-ctx.arcTo(0, 50, Infinity, 50, 0);
-ctx.arcTo(0, 50, -Infinity, 50, 0);
-ctx.arcTo(0, 50, NaN, 50, 0);
-ctx.arcTo(0, 50, 0, Infinity, 0);
-ctx.arcTo(0, 50, 0, -Infinity, 0);
-ctx.arcTo(0, 50, 0, NaN, 0);
-ctx.arcTo(0, 50, 0, 50, Infinity);
-ctx.arcTo(0, 50, 0, 50, -Infinity);
-ctx.arcTo(0, 50, 0, 50, NaN);
-ctx.arcTo(Infinity, Infinity, 0, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
-ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
-ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
-ctx.arcTo(Infinity, 50, 0, Infinity, 0);
-ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
-ctx.arcTo(Infinity, 50, 0, 50, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
-ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
-ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
-ctx.arcTo(0, Infinity, 0, Infinity, 0);
-ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
-ctx.arcTo(0, Infinity, 0, 50, Infinity);
-ctx.arcTo(0, 50, Infinity, Infinity, 0);
-ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
-ctx.arcTo(0, 50, Infinity, 50, Infinity);
-ctx.arcTo(0, 50, 0, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.arcTo(Infinity, 50, 0, 50, 0);
+ ctx.arcTo(-Infinity, 50, 0, 50, 0);
+ ctx.arcTo(NaN, 50, 0, 50, 0);
+ ctx.arcTo(0, Infinity, 0, 50, 0);
+ ctx.arcTo(0, -Infinity, 0, 50, 0);
+ ctx.arcTo(0, NaN, 0, 50, 0);
+ ctx.arcTo(0, 50, Infinity, 50, 0);
+ ctx.arcTo(0, 50, -Infinity, 50, 0);
+ ctx.arcTo(0, 50, NaN, 50, 0);
+ ctx.arcTo(0, 50, 0, Infinity, 0);
+ ctx.arcTo(0, 50, 0, -Infinity, 0);
+ ctx.arcTo(0, 50, 0, NaN, 0);
+ ctx.arcTo(0, 50, 0, 50, Infinity);
+ ctx.arcTo(0, 50, 0, 50, -Infinity);
+ ctx.arcTo(0, 50, 0, 50, NaN);
+ ctx.arcTo(Infinity, Infinity, 0, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, 0);
+ ctx.arcTo(Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, Infinity, 0, 50, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, 0);
+ ctx.arcTo(Infinity, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, Infinity, 50, Infinity);
+ ctx.arcTo(Infinity, 50, 0, Infinity, 0);
+ ctx.arcTo(Infinity, 50, 0, Infinity, Infinity);
+ ctx.arcTo(Infinity, 50, 0, 50, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, 0);
+ ctx.arcTo(0, Infinity, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, Infinity, 50, Infinity);
+ ctx.arcTo(0, Infinity, 0, Infinity, 0);
+ ctx.arcTo(0, Infinity, 0, Infinity, Infinity);
+ ctx.arcTo(0, Infinity, 0, 50, Infinity);
+ ctx.arcTo(0, 50, Infinity, Infinity, 0);
+ ctx.arcTo(0, 50, Infinity, Infinity, Infinity);
+ ctx.arcTo(0, 50, Infinity, 50, Infinity);
+ ctx.arcTo(0, 50, 0, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html
index 7139455bda4..26dfa640ff8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.html
@@ -17,29 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.scale(0.1, 1);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-1000, 0);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.scale(0.1, 1);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-1000, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js
index b06c8f935c5..dc41e6d92dd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.scale.worker.js
@@ -13,29 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.scale(0.1, 1);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-1000, 0);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.scale(0.1, 1);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-1000, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html
index 659b02ceed4..f7d10dd61a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.html
@@ -17,40 +17,44 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-_assertPixel(canvas, 65,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
+ _assertPixel(canvas, 65,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js
index 5223b55abb2..c7e61ab5761 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve1.worker.js
@@ -13,40 +13,43 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-_assertPixel(canvas, 65,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
+ _assertPixel(canvas, 65,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html
index 02ab6c1437d..1a023322b21 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.html
@@ -17,39 +17,43 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
-ctx.fill();
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js
index f06c2cdc33f..f00e506f30e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.curve2.worker.js
@@ -13,39 +13,42 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var tol = 1.5; // tolerance to avoid antialiasing artifacts
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.beginPath();
-ctx.rect(10, 20, 45, 10);
-ctx.moveTo(80, 45);
-ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
-ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
-ctx.fill();
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 10;
-ctx.beginPath();
-ctx.moveTo(10, 25);
-ctx.arcTo(75, 25, 75, 60, 20);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 55,19, 0,255,0,255);
-_assertPixel(canvas, 55,20, 0,255,0,255);
-_assertPixel(canvas, 55,21, 0,255,0,255);
-_assertPixel(canvas, 64,22, 0,255,0,255);
-_assertPixel(canvas, 65,21, 0,255,0,255);
-_assertPixel(canvas, 72,28, 0,255,0,255);
-_assertPixel(canvas, 73,27, 0,255,0,255);
-_assertPixel(canvas, 78,36, 0,255,0,255);
-_assertPixel(canvas, 79,35, 0,255,0,255);
-_assertPixel(canvas, 80,44, 0,255,0,255);
-_assertPixel(canvas, 80,45, 0,255,0,255);
-_assertPixel(canvas, 80,46, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var tol = 1.5; // tolerance to avoid antialiasing artifacts
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.beginPath();
+ ctx.rect(10, 20, 45, 10);
+ ctx.moveTo(80, 45);
+ ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
+ ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
+ ctx.fill();
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 10;
+ ctx.beginPath();
+ ctx.moveTo(10, 25);
+ ctx.arcTo(75, 25, 75, 60, 20);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 55,19, 0,255,0,255);
+ _assertPixel(canvas, 55,20, 0,255,0,255);
+ _assertPixel(canvas, 55,21, 0,255,0,255);
+ _assertPixel(canvas, 64,22, 0,255,0,255);
+ _assertPixel(canvas, 65,21, 0,255,0,255);
+ _assertPixel(canvas, 72,28, 0,255,0,255);
+ _assertPixel(canvas, 73,27, 0,255,0,255);
+ _assertPixel(canvas, 78,36, 0,255,0,255);
+ _assertPixel(canvas, 79,35, 0,255,0,255);
+ _assertPixel(canvas, 80,44, 0,255,0,255);
+ _assertPixel(canvas, 80,45, 0,255,0,255);
+ _assertPixel(canvas, 80,46, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html
index 0871c39157f..3f8af61215c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.html
@@ -17,23 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.arcTo(-100, 25, 200, 25, 10);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.arcTo(-100, 25, 200, 25, 10);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js
index f3addb0a0c7..20cc956a449 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.end.worker.js
@@ -13,23 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.arcTo(-100, 25, 200, 25, 10);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.arcTo(-100, 25, 200, 25, 10);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html
index 5040462ada3..a426a19d8a2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.html
@@ -17,23 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(200, 25, 200, 50, 10);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(200, 25, 200, 50, 10);
+ ctx.stroke();
+
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js
index 36706d600e2..cebf27a821b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.shape.start.worker.js
@@ -13,23 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(200, 25, 200, 50, 10);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(200, 25, 200, 50, 10);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html
index bea6374ea4e..842210138a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.html
@@ -17,28 +17,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-100, 0);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js
index 925140b6750..585a500079f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.transformation.worker.js
@@ -13,28 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 50);
-ctx.translate(100, 0);
-ctx.arcTo(50, 50, 50, 0, 50);
-ctx.lineTo(-100, 0);
-ctx.fill();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 50);
+ ctx.translate(100, 0);
+ ctx.arcTo(50, 50, 50, 0, 50);
+ ctx.lineTo(-100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html
index 00541a938b6..a367385551b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.html
@@ -17,24 +17,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 100, 0);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(0, -25);
-ctx.arcTo(50, -25, 50, 50, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 100, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(0, -25);
+ ctx.arcTo(50, -25, 50, 50, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js
index cee6d1c5baa..8f6d979a55a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.1.worker.js
@@ -13,24 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, 100, 100, 0);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(0, -25);
-ctx.arcTo(50, -25, 50, 50, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, 100, 100, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(0, -25);
+ ctx.arcTo(50, -25, 50, 50, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html
index e10fe5ce95e..87ab4e13dea 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.html
@@ -17,24 +17,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 0);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 50, 25, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 50, 25, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js
index d0cc4a1484a..0a459763254 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.arcTo.zero.2.worker.js
@@ -13,24 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.strokeStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.arcTo(100, 25, -100, 25, 0);
-ctx.stroke();
-ctx.strokeStyle = '#f00';
-ctx.beginPath();
-ctx.moveTo(100, 25);
-ctx.arcTo(200, 25, 50, 25, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.strokeStyle = '#0f0';
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.arcTo(100, 25, -100, 25, 0);
+ ctx.stroke();
+
+ ctx.strokeStyle = '#f00';
+ ctx.beginPath();
+ ctx.moveTo(100, 25);
+ ctx.arcTo(200, 25, 50, 25, 0);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html
index 8b9c4cdc7ac..b2043d604d9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.html
@@ -17,17 +17,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js
index 18b81afa5c4..35a4acc84d6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.beginPath.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html
index 69172874322..099919060be 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js
index a365372c9e6..e7c86a08f96 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.basic.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
index 67dd771fcbe..6a11d1bfbb0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js
index beb275ba378..d6ef6f3f1b8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.1.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
index d4f99e1e2a4..d2afd19f666 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js
index 7176dba0787..6860e60f4ac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.ensuresubpath.2.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html
index 4c5abfbdc1e..b49e2f43f3f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.html
@@ -17,93 +17,93 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js
index 752cb1b0ab8..7eaf278f6cb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.nonfinite.worker.js
@@ -13,93 +13,92 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
-ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
-ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
-ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
-ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
-ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(-Infinity, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(NaN, 50, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, -Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, NaN, 0, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, -Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, NaN, 50, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, -Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, NaN, 0, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, -Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, NaN, 50);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, -Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, 0, NaN);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(Infinity, 50, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, Infinity, 0, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, Infinity, 50, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, 50);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, Infinity, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, Infinity, 0, Infinity);
+ ctx.bezierCurveTo(0, 50, 0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html
index 2608237a6c0..10a085e9dec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.html
@@ -17,24 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-2, 3.1);
-ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-2, 3.1);
+ ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js
index 641cccf4b46..5098fe83eb6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.scaled.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-2, 3.1);
-ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-2, 3.1);
+ ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html
index 5f8f8daac2a..fc6b9273e04 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-2000, 3100);
-ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-2000, 3100);
+ ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js
index ee42982f2f6..58f601c5d5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.bezierCurveTo.shape.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-2000, 3100);
-ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-2000, 3100);
+ ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html
index cca53f6be6d..e90be3d73f0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.html
@@ -17,18 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clip();
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clip();
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js
index cf5a5d3b63f..708608e1e00 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.1.worker.js
@@ -13,18 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 100, 50);
-ctx.clip();
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 50);
+ ctx.clip();
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html
index d5ef79bf1a1..6426ba2d838 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.html
@@ -17,18 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(-100, 0, 100, 50);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(-100, 0, 100, 50);
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js
index bad906d4b73..1ec28b6205e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.basic.2.worker.js
@@ -13,18 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(-100, 0, 100, 50);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(-100, 0, 100, 50);
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html
index d74fff0d81f..30e0d6cba48 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.html
@@ -17,17 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js
index 51beb6426a5..3f91a7e2e78 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.empty.worker.js
@@ -13,17 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html
index 3b269ce102d..94607f6d926 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.html
@@ -17,21 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.beginPath();
-ctx.rect(50, 0, 50, 50)
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.beginPath();
+ ctx.rect(50, 0, 50, 50)
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js
index 791c1bb7848..8c0fcb68bd3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.intersect.worker.js
@@ -13,21 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.beginPath();
-ctx.rect(50, 0, 50, 50)
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.beginPath();
+ ctx.rect(50, 0, 50, 50)
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html
index a0ba94fb8a4..e9b69282af9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.html
@@ -17,22 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
-ctx.lineTo(0, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
+
+ ctx.lineTo(0, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js
index e03257021c4..d65a421d336 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.unaffected.worker.js
@@ -13,22 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
-ctx.lineTo(0, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
+
+ ctx.lineTo(0, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html
index 9a20e493db2..2fd7c1abbf9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.html
@@ -17,26 +17,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js
index 02565fcc8b8..aa89fd55c3d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.1.worker.js
@@ -13,26 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.clip();
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html
index 1f223a3b38f..eed064f84ec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.html
@@ -17,29 +17,33 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.clip();
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.lineTo(0, 0);
-ctx.clip();
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.clip();
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js
index e7e8c5039de..5c9cac6bb60 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.clip.winding.2.worker.js
@@ -13,29 +13,32 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.clip();
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.lineTo(0, 0);
-ctx.clip();
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.clip();
+
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.clip();
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html
index 50ea865696c..c7596a8f1cc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js
index c06ce48635f..c9a4030e681 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.empty.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html
index dca2e01b7e9..771f3d3ca08 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.html
@@ -17,21 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.closePath();
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.closePath();
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js
index 5d27821f551..4dff932086e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.newline.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.closePath();
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.closePath();
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html
index 4cf02d2b644..3dffdeaf5b9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -1000);
-ctx.closePath();
-ctx.lineTo(1000, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -1000);
+ ctx.closePath();
+ ctx.lineTo(1000, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js
index 8a84ce7d83c..86d931b6714 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.closePath.nextpoint.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -1000);
-ctx.closePath();
-ctx.lineTo(1000, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -1000);
+ ctx.closePath();
+ ctx.lineTo(1000, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html
new file mode 100644
index 00000000000..d664c455931
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.ellipse.basics</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.ellipse.basics</h1>
+<p class="desc">Verify canvas throws error when drawing ellipse with negative radii.</p>
+
+
+<script>
+var t = async_test("Verify canvas throws error when drawing ellipse with negative radii.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
+ ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
+ ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
+ ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js
new file mode 100644
index 00000000000..60f3e9a6731
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.ellipse.basics.worker.js
@@ -0,0 +1,28 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.ellipse.basics
+// Description:Verify canvas throws error when drawing ellipse with negative radii.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify canvas throws error when drawing ellipse with negative radii.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.ellipse(10, 10, 10, 5, 0, 0, 1, false);
+ ctx.ellipse(10, 10, 10, 0, 0, 0, 1, false);
+ ctx.ellipse(10, 10, -0, 5, 0, 0, 1, false);
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, 5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, 0, -1.5, 0, 0, 1, false); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.ellipse(10, 10, -2, -5, 0, 0, 1, false); });
+ ctx.ellipse(80, 0, 10, 4294967277, Math.PI / -84, -Math.PI / 2147483436, false);
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html
index 72e755f7e8f..6f8fd51de79 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.html
@@ -17,19 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js
index 2c63e1ec97f..9dad73b579b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.basic.worker.js
@@ -13,19 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html
index 9d545125398..706e38d176f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.html
@@ -17,22 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 10,40, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 10,40, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js
index 6b4aa9244f3..b6d79828668 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.closed.unaffected.worker.js
@@ -13,22 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#00f';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 90,10, 0,255,0,255);
-_assertPixel(canvas, 10,40, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#00f';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ _assertPixel(canvas, 90,10, 0,255,0,255);
+ _assertPixel(canvas, 10,40, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html
index 6eaf88edcde..da936fab579 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.html
@@ -17,18 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.rect(0, 0, 100, 50);
-ctx.closePath();
-ctx.rect(10, 10, 80, 30);
-ctx.fill();
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.rect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.rect(10, 10, 80, 30);
+ ctx.fill();
+
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png
new file mode 100644
index 00000000000..e2a35d48d4c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js
index e1d64fe40bf..8f30cc7af2c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.overlap.worker.js
@@ -13,18 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.rect(0, 0, 100, 50);
-ctx.closePath();
-ctx.rect(10, 10, 80, 30);
-ctx.fill();
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
-t.done();
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.rect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.rect(10, 10, 80, 30);
+ ctx.fill();
+
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html
index c5f64924da3..40845a4a778 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.html
@@ -17,24 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js
index b40e1706239..cdbfc7f3a49 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.add.worker.js
@@ -13,24 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html
index 4f553f2bc32..e0f9c838b15 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.html
@@ -17,24 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js
index a8209154139..3d6a1660def 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.1.worker.js
@@ -13,24 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html
index cf1fcaa2d44..c7de03ae084 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.html
@@ -17,23 +17,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js
index 2c83a41ae8e..0e8b4c79a59 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.2.worker.js
@@ -13,23 +13,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.moveTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.moveTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html
index ffcbfe2518d..3d12380357d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.html
@@ -17,29 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(-20, -20);
-ctx.lineTo(120, -20);
-ctx.lineTo(120, 70);
-ctx.lineTo(-20, 70);
-ctx.lineTo(-20, -20);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(120, -20);
+ ctx.lineTo(120, 70);
+ ctx.lineTo(-20, 70);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js
index ca5510abf21..6c9f07c76a8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.fill.winding.subtract.3.worker.js
@@ -13,29 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(-10, -10);
-ctx.lineTo(110, -10);
-ctx.lineTo(110, 60);
-ctx.lineTo(-10, 60);
-ctx.lineTo(-10, -10);
-ctx.lineTo(-20, -20);
-ctx.lineTo(120, -20);
-ctx.lineTo(120, 70);
-ctx.lineTo(-20, 70);
-ctx.lineTo(-20, -20);
-ctx.lineTo(0, 0);
-ctx.lineTo(0, 50);
-ctx.lineTo(100, 50);
-ctx.lineTo(100, 0);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(-10, -10);
+ ctx.lineTo(110, -10);
+ ctx.lineTo(110, 60);
+ ctx.lineTo(-10, 60);
+ ctx.lineTo(-10, -10);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(120, -20);
+ ctx.lineTo(120, 70);
+ ctx.lineTo(-20, 70);
+ ctx.lineTo(-20, -20);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(100, 0);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.html
index 35c96cdab5d..e2e02f51423 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js
index de8597fbc3c..de1a9350329 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.initial.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.closePath();
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.closePath();
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html
index fe12f9457af..ccffcd7d76c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.arc(50, 25, 10, 0, Math.PI, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-t.done();
+ ctx.arc(50, 25, 10, 0, Math.PI, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js
index 2803e393256..13510b744f5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.arc.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.arc(50, 25, 10, 0, Math.PI, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.arc(50, 25, 10, 0, Math.PI, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), false, "ctx.isPointInPath(50, 20)", "false");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html
index 3cd24f54875..7b9673a8120 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.html
@@ -17,13 +17,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-t.done();
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
index 93dd86a5f79..f51900ea6bf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.1.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html
index 42381d3f552..3710dd185d9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.html
@@ -17,13 +17,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(20, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-t.done();
+ ctx.rect(20, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js
index 7dbc5fc6fb2..6024a0dc390 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.2.worker.js
@@ -13,13 +13,12 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(20, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(20, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html
new file mode 100644
index 00000000000..21cf448de21
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.html
@@ -0,0 +1,66 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.isPointInPath.basic</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.isPointInPath.basic</h1>
+<p class="desc">Verify the winding rule in isPointInPath works for for rect path.</p>
+
+
+<script>
+var t = async_test("Verify the winding rule in isPointInPath works for for rect path.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+
+ // Testing default isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50), true, "ctx.isPointInPath(50, 50)", "true");
+ _assertSame(ctx.isPointInPath(NaN, 50), false, "ctx.isPointInPath(NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(50, NaN), false, "ctx.isPointInPath(50, NaN)", "false");
+
+ // Testing nonzero isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'nonzero'), true, "ctx.isPointInPath(50, 50, 'nonzero')", "true");
+
+ // Testing evenodd isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'evenodd'), false, "ctx.isPointInPath(50, 50, 'evenodd')", "false");
+
+ // Testing extremely large scale
+ ctx.save();
+ ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), true, "ctx.isPointInPath(0, 0, 'nonzero')", "true");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), true, "ctx.isPointInPath(0, 0, 'evenodd')", "true");
+ ctx.restore();
+
+ // Check with non-invertible ctm.
+ ctx.save();
+ ctx.scale(0, 0);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), false, "ctx.isPointInPath(0, 0, 'nonzero')", "false");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), false, "ctx.isPointInPath(0, 0, 'evenodd')", "false");
+ ctx.restore();
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js
new file mode 100644
index 00000000000..3e2a95c15e5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.basic.worker.js
@@ -0,0 +1,61 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInPath.basic
+// Description:Verify the winding rule in isPointInPath works for for rect path.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify the winding rule in isPointInPath works for for rect path.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+
+ // Testing default isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50), true, "ctx.isPointInPath(50, 50)", "true");
+ _assertSame(ctx.isPointInPath(NaN, 50), false, "ctx.isPointInPath(NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(50, NaN), false, "ctx.isPointInPath(50, NaN)", "false");
+
+ // Testing nonzero isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'nonzero'), true, "ctx.isPointInPath(50, 50, 'nonzero')", "true");
+
+ // Testing evenodd isPointInPath
+ ctx.beginPath();
+ ctx.rect(0, 0, 100, 100);
+ ctx.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(50, 50, 'evenodd'), false, "ctx.isPointInPath(50, 50, 'evenodd')", "false");
+
+ // Testing extremely large scale
+ ctx.save();
+ ctx.scale(Number.MAX_VALUE, Number.MAX_VALUE);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), true, "ctx.isPointInPath(0, 0, 'nonzero')", "true");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), true, "ctx.isPointInPath(0, 0, 'evenodd')", "true");
+ ctx.restore();
+
+ // Check with non-invertible ctm.
+ ctx.save();
+ ctx.scale(0, 0);
+ ctx.beginPath();
+ ctx.rect(-10, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0, 'nonzero'), false, "ctx.isPointInPath(0, 0, 'nonzero')", "false");
+ _assertSame(ctx.isPointInPath(0, 0, 'evenodd'), false, "ctx.isPointInPath(0, 0, 'evenodd')", "false");
+ ctx.restore();
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html
index f336fe4c7f6..d348110305e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.html
@@ -17,32 +17,32 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(25, 25);
-ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
-_assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
-_assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
-_assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
-_assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
-_assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
-_assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
-_assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
-_assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
-_assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
-_assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
-_assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
-_assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
-_assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
-t.done();
+ ctx.moveTo(25, 25);
+ ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
+ _assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
+ _assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
+ _assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
+ _assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
+ _assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
+ _assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
+ _assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
+ _assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
+ _assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
+ _assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
+ _assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
+ _assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js
index 6017efc286e..894fe5da314 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bezier.worker.js
@@ -13,32 +13,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(25, 25);
-ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
-_assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
-_assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
-_assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
-_assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
-_assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
-_assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
-_assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
-_assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
-_assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
-_assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
-_assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
-_assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
-_assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
-_assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
-_assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(25, 25);
+ ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
+ _assertSame(ctx.isPointInPath(25, 20), false, "ctx.isPointInPath(25, 20)", "false");
+ _assertSame(ctx.isPointInPath(25, 30), false, "ctx.isPointInPath(25, 30)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), true, "ctx.isPointInPath(30, 20)", "true");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 2), false, "ctx.isPointInPath(40, 2)", "false");
+ _assertSame(ctx.isPointInPath(40, 20), true, "ctx.isPointInPath(40, 20)", "true");
+ _assertSame(ctx.isPointInPath(40, 30), false, "ctx.isPointInPath(40, 30)", "false");
+ _assertSame(ctx.isPointInPath(40, 47), false, "ctx.isPointInPath(40, 47)", "false");
+ _assertSame(ctx.isPointInPath(45, 20), true, "ctx.isPointInPath(45, 20)", "true");
+ _assertSame(ctx.isPointInPath(45, 30), false, "ctx.isPointInPath(45, 30)", "false");
+ _assertSame(ctx.isPointInPath(55, 20), false, "ctx.isPointInPath(55, 20)", "false");
+ _assertSame(ctx.isPointInPath(55, 30), true, "ctx.isPointInPath(55, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 2), false, "ctx.isPointInPath(60, 2)", "false");
+ _assertSame(ctx.isPointInPath(60, 20), false, "ctx.isPointInPath(60, 20)", "false");
+ _assertSame(ctx.isPointInPath(60, 30), true, "ctx.isPointInPath(60, 30)", "true");
+ _assertSame(ctx.isPointInPath(60, 47), false, "ctx.isPointInPath(60, 47)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), true, "ctx.isPointInPath(70, 30)", "true");
+ _assertSame(ctx.isPointInPath(75, 20), false, "ctx.isPointInPath(75, 20)", "false");
+ _assertSame(ctx.isPointInPath(75, 30), false, "ctx.isPointInPath(75, 30)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html
index 2e6e78fedb0..fcb4ca88273 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.arc(50, 25, 10, 0, 7, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-t.done();
+ ctx.arc(50, 25, 10, 0, 7, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js
index 1ee00102152..40233790c81 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.bigarc.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.arc(50, 25, 10, 0, 7, false);
-_assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
-_assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
-_assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
-_assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-_assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
-_assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
-_assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.arc(50, 25, 10, 0, 7, false);
+ _assertSame(ctx.isPointInPath(50, 10), false, "ctx.isPointInPath(50, 10)", "false");
+ _assertSame(ctx.isPointInPath(50, 20), true, "ctx.isPointInPath(50, 20)", "true");
+ _assertSame(ctx.isPointInPath(50, 30), true, "ctx.isPointInPath(50, 30)", "true");
+ _assertSame(ctx.isPointInPath(50, 40), false, "ctx.isPointInPath(50, 40)", "false");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ _assertSame(ctx.isPointInPath(70, 20), false, "ctx.isPointInPath(70, 20)", "false");
+ _assertSame(ctx.isPointInPath(30, 30), false, "ctx.isPointInPath(30, 30)", "false");
+ _assertSame(ctx.isPointInPath(70, 30), false, "ctx.isPointInPath(70, 30)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html
index bcd4eaefd9f..aa367b4e56c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
-_assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
-_assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
-_assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
-_assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
-_assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
-_assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
-_assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
-t.done();
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
+ _assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
+ _assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
+ _assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
+ _assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
+ _assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
+ _assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
+ _assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js
index 21222ebc4fb..3918a6fe83d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.edge.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
-_assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
-_assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
-_assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
-_assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
-_assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
-_assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
-_assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
-_assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
-_assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(0, 0), true, "ctx.isPointInPath(0, 0)", "true");
+ _assertSame(ctx.isPointInPath(10, 0), true, "ctx.isPointInPath(10, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 0), true, "ctx.isPointInPath(20, 0)", "true");
+ _assertSame(ctx.isPointInPath(20, 10), true, "ctx.isPointInPath(20, 10)", "true");
+ _assertSame(ctx.isPointInPath(20, 20), true, "ctx.isPointInPath(20, 20)", "true");
+ _assertSame(ctx.isPointInPath(10, 20), true, "ctx.isPointInPath(10, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 20), true, "ctx.isPointInPath(0, 20)", "true");
+ _assertSame(ctx.isPointInPath(0, 10), true, "ctx.isPointInPath(0, 10)", "true");
+ _assertSame(ctx.isPointInPath(10, -0.01), false, "ctx.isPointInPath(10, -0.01)", "false");
+ _assertSame(ctx.isPointInPath(10, 20.01), false, "ctx.isPointInPath(10, 20.01)", "false");
+ _assertSame(ctx.isPointInPath(-0.01, 10), false, "ctx.isPointInPath(-0.01, 10)", "false");
+ _assertSame(ctx.isPointInPath(20.01, 10), false, "ctx.isPointInPath(20.01, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html
index 9a875097b02..d2ebf1e7e1b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.html
@@ -17,11 +17,11 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-_assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
-t.done();
+ _assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js
index e449ee2e69b..319836dcb58 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.empty.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertSame(ctx.isPointInPath(0, 0), false, "ctx.isPointInPath(0, 0)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html
index 8dc4c1df3a0..ef12d057ed5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(-100, -50, 200, 100);
-_assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
-_assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
-_assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
-t.done();
+ ctx.rect(-100, -50, 200, 100);
+ _assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
+ _assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
+ _assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js
index 70a4ece1621..dfa6eec766c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.nonfinite.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(-100, -50, 200, 100);
-_assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
-_assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
-_assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
-_assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
-_assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(-100, -50, 200, 100);
+ _assertSame(ctx.isPointInPath(Infinity, 0), false, "ctx.isPointInPath(Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(-Infinity, 0), false, "ctx.isPointInPath(-Infinity, 0)", "false");
+ _assertSame(ctx.isPointInPath(NaN, 0), false, "ctx.isPointInPath(NaN, 0)", "false");
+ _assertSame(ctx.isPointInPath(0, Infinity), false, "ctx.isPointInPath(0, Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, -Infinity), false, "ctx.isPointInPath(0, -Infinity)", "false");
+ _assertSame(ctx.isPointInPath(0, NaN), false, "ctx.isPointInPath(0, NaN)", "false");
+ _assertSame(ctx.isPointInPath(NaN, NaN), false, "ctx.isPointInPath(NaN, NaN)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html
index d1a1d86a02c..ce2ab819dd8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(0, -100, 20, 20);
-ctx.rect(20, -10, 20, 20);
-_assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
-_assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
-_assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
-_assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
-_assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-t.done();
+ ctx.rect(0, -100, 20, 20);
+ ctx.rect(20, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
+ _assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
+ _assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
+ _assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
+ _assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js
index 6d071050469..d4db12ef379 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.outside.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(0, -100, 20, 20);
-ctx.rect(20, -10, 20, 20);
-_assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
-_assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
-_assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
-_assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
-_assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
-_assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(0, -100, 20, 20);
+ ctx.rect(20, -10, 20, 20);
+ _assertSame(ctx.isPointInPath(10, -110), false, "ctx.isPointInPath(10, -110)", "false");
+ _assertSame(ctx.isPointInPath(10, -90), true, "ctx.isPointInPath(10, -90)", "true");
+ _assertSame(ctx.isPointInPath(10, -70), false, "ctx.isPointInPath(10, -70)", "false");
+ _assertSame(ctx.isPointInPath(30, -20), false, "ctx.isPointInPath(30, -20)", "false");
+ _assertSame(ctx.isPointInPath(30, 0), true, "ctx.isPointInPath(30, 0)", "true");
+ _assertSame(ctx.isPointInPath(30, 20), false, "ctx.isPointInPath(30, 20)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html
index b0ea1f9a0f1..c4abd927646 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(0, 0, 20, 20);
-ctx.beginPath();
-ctx.rect(20, 0, 20, 20);
-ctx.closePath();
-ctx.rect(40, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-_assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
-t.done();
+ ctx.rect(0, 0, 20, 20);
+ ctx.beginPath();
+ ctx.rect(20, 0, 20, 20);
+ ctx.closePath();
+ ctx.rect(40, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+ _assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js
index 4a82fcc08a1..82df3b7c70a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.subpath.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(0, 0, 20, 20);
-ctx.beginPath();
-ctx.rect(20, 0, 20, 20);
-ctx.closePath();
-ctx.rect(40, 0, 20, 20);
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
-_assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(0, 0, 20, 20);
+ ctx.beginPath();
+ ctx.rect(20, 0, 20, 20);
+ ctx.closePath();
+ ctx.rect(40, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(30, 10), true, "ctx.isPointInPath(30, 10)", "true");
+ _assertSame(ctx.isPointInPath(50, 10), true, "ctx.isPointInPath(50, 10)", "true");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html
index 9b7b2e5ee0f..bccaa842e52 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.translate(50, 0);
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ ctx.translate(50, 0);
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js
index 2fafbe910e9..0774fd0d62d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.translate(50, 0);
-ctx.rect(0, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.translate(50, 0);
+ ctx.rect(0, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html
index 45b884f2b5c..1e587c1d8a8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.rect(50, 0, 20, 20);
-ctx.translate(50, 0);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(50, 0);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js
index 3f37e62057e..ff4c42c450c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.rect(50, 0, 20, 20);
-ctx.translate(50, 0);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(50, 0);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html
index 923da480e8a..826d7e23c98 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.scale(-1, 1);
-ctx.rect(-70, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ ctx.scale(-1, 1);
+ ctx.rect(-70, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js
index 172d0a72a4e..f6750e91090 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.3.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.scale(-1, 1);
-ctx.rect(-70, 0, 20, 20);
-_assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
-_assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
-_assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
-_assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
-_assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
-_assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.scale(-1, 1);
+ ctx.rect(-70, 0, 20, 20);
+ _assertSame(ctx.isPointInPath(-40, 10), false, "ctx.isPointInPath(-40, 10)", "false");
+ _assertSame(ctx.isPointInPath(10, 10), false, "ctx.isPointInPath(10, 10)", "false");
+ _assertSame(ctx.isPointInPath(49, 10), false, "ctx.isPointInPath(49, 10)", "false");
+ _assertSame(ctx.isPointInPath(51, 10), true, "ctx.isPointInPath(51, 10)", "true");
+ _assertSame(ctx.isPointInPath(69, 10), true, "ctx.isPointInPath(69, 10)", "true");
+ _assertSame(ctx.isPointInPath(71, 10), false, "ctx.isPointInPath(71, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html
index 0f87cc2b212..97792d68893 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.translate(50, 0);
-ctx.rect(50, 0, 20, 20);
-ctx.translate(0, 50);
-_assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
-_assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
-_assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
-t.done();
+ ctx.translate(50, 0);
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(0, 50);
+ _assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
+ _assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
+ _assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js
index 993148110a5..f43a8a3d1ef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.transform.4.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.translate(50, 0);
-ctx.rect(50, 0, 20, 20);
-ctx.translate(0, 50);
-_assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
-_assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
-_assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.translate(50, 0);
+ ctx.rect(50, 0, 20, 20);
+ ctx.translate(0, 50);
+ _assertSame(ctx.isPointInPath(60, 10), false, "ctx.isPointInPath(60, 10)", "false");
+ _assertSame(ctx.isPointInPath(110, 10), true, "ctx.isPointInPath(110, 10)", "true");
+ _assertSame(ctx.isPointInPath(110, 60), false, "ctx.isPointInPath(110, 60)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html
index 098370f0f7d..3920c7de4b5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(20, 0);
-ctx.lineTo(20, 20);
-ctx.lineTo(0, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(20, 0);
+ ctx.lineTo(20, 20);
+ ctx.lineTo(0, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js
index ad4ac8781bc..7b5ffc4a795 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.unclosed.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(20, 0);
-ctx.lineTo(20, 20);
-ctx.lineTo(0, 20);
-_assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
-_assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(20, 0);
+ ctx.lineTo(20, 20);
+ ctx.lineTo(0, 20);
+ _assertSame(ctx.isPointInPath(10, 10), true, "ctx.isPointInPath(10, 10)", "true");
+ _assertSame(ctx.isPointInPath(30, 10), false, "ctx.isPointInPath(30, 10)", "false");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html
index 9698017e4fe..b2741a5069f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.html
@@ -17,30 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-// Create a square ring, using opposite windings to make a hole in the centre
-ctx.moveTo(0, 0);
-ctx.lineTo(50, 0);
-ctx.lineTo(50, 50);
-ctx.lineTo(0, 50);
-ctx.lineTo(0, 0);
-ctx.lineTo(10, 10);
-ctx.lineTo(10, 40);
-ctx.lineTo(40, 40);
-ctx.lineTo(40, 10);
-ctx.lineTo(10, 10);
-_assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
-_assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
-_assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
-_assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
-_assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
-_assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
-_assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
-_assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
-_assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
-t.done();
+ // Create a square ring, using opposite windings to make a hole in the centre
+ ctx.moveTo(0, 0);
+ ctx.lineTo(50, 0);
+ ctx.lineTo(50, 50);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(10, 10);
+ ctx.lineTo(10, 40);
+ ctx.lineTo(40, 40);
+ ctx.lineTo(40, 10);
+ ctx.lineTo(10, 10);
+
+ _assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
+ _assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
+ _assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
+ _assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
+ _assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
+ _assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
+ _assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
+ _assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
+ _assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js
index 6ef758114a0..094bc05910d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInPath.winding.worker.js
@@ -13,30 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-// Create a square ring, using opposite windings to make a hole in the centre
-ctx.moveTo(0, 0);
-ctx.lineTo(50, 0);
-ctx.lineTo(50, 50);
-ctx.lineTo(0, 50);
-ctx.lineTo(0, 0);
-ctx.lineTo(10, 10);
-ctx.lineTo(10, 40);
-ctx.lineTo(40, 40);
-ctx.lineTo(40, 10);
-ctx.lineTo(10, 10);
-_assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
-_assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
-_assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
-_assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
-_assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
-_assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
-_assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
-_assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
-_assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
-t.done();
+ // Create a square ring, using opposite windings to make a hole in the centre
+ ctx.moveTo(0, 0);
+ ctx.lineTo(50, 0);
+ ctx.lineTo(50, 50);
+ ctx.lineTo(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.lineTo(10, 10);
+ ctx.lineTo(10, 40);
+ ctx.lineTo(40, 40);
+ ctx.lineTo(40, 10);
+ ctx.lineTo(10, 10);
+ _assertSame(ctx.isPointInPath(5, 5), true, "ctx.isPointInPath(5, 5)", "true");
+ _assertSame(ctx.isPointInPath(25, 5), true, "ctx.isPointInPath(25, 5)", "true");
+ _assertSame(ctx.isPointInPath(45, 5), true, "ctx.isPointInPath(45, 5)", "true");
+ _assertSame(ctx.isPointInPath(5, 25), true, "ctx.isPointInPath(5, 25)", "true");
+ _assertSame(ctx.isPointInPath(25, 25), false, "ctx.isPointInPath(25, 25)", "false");
+ _assertSame(ctx.isPointInPath(45, 25), true, "ctx.isPointInPath(45, 25)", "true");
+ _assertSame(ctx.isPointInPath(5, 45), true, "ctx.isPointInPath(5, 45)", "true");
+ _assertSame(ctx.isPointInPath(25, 45), true, "ctx.isPointInPath(25, 45)", "true");
+ _assertSame(ctx.isPointInPath(45, 45), true, "ctx.isPointInPath(45, 45)", "true");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html
new file mode 100644
index 00000000000..1ed13b32de6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.html
@@ -0,0 +1,40 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.isPointInStroke.scaleddashes</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.isPointInStroke.scaleddashes</h1>
+<p class="desc">isPointInStroke() should return correct results on dashed paths at high scale factors</p>
+
+
+<script>
+var t = async_test("isPointInStroke() should return correct results on dashed paths at high scale factors");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var scale = 20;
+ ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle
+ ctx.scale(scale, scale);
+ ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false);
+ ctx.stroke();
+
+ // hit-test the beginning of the dash (t=0)
+ _assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true");
+ // hit-test the middle of the dash (t=5)
+ _assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true");
+ // hit-test the end of the dash (t=9.8)
+ _assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true");
+ // hit-test past the end of the dash (t=10.2)
+ _assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false");
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js
new file mode 100644
index 00000000000..240905308e3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInStroke.scaleddashes.worker.js
@@ -0,0 +1,35 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInStroke.scaleddashes
+// Description:isPointInStroke() should return correct results on dashed paths at high scale factors
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("isPointInStroke() should return correct results on dashed paths at high scale factors");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var scale = 20;
+ ctx.setLineDash([10, 21.4159]); // dash from t=0 to t=10 along the circle
+ ctx.scale(scale, scale);
+ ctx.ellipse(6, 10, 5, 5, 0, 2*Math.PI, false);
+ ctx.stroke();
+
+ // hit-test the beginning of the dash (t=0)
+ _assertSame(ctx.isPointInStroke(11*scale, 10*scale), true, "ctx.isPointInStroke(11*scale, 10*scale)", "true");
+ // hit-test the middle of the dash (t=5)
+ _assertSame(ctx.isPointInStroke(8.70*scale, 14.21*scale), true, "ctx.isPointInStroke(8.70*scale, 14.21*scale)", "true");
+ // hit-test the end of the dash (t=9.8)
+ _assertSame(ctx.isPointInStroke(4.10*scale, 14.63*scale), true, "ctx.isPointInStroke(4.10*scale, 14.63*scale)", "true");
+ // hit-test past the end of the dash (t=10.2)
+ _assertSame(ctx.isPointInStroke(3.74*scale, 14.46*scale), false, "ctx.isPointInStroke(3.74*scale, 14.46*scale)", "false");
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html
new file mode 100644
index 00000000000..0b4c635fc86
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.isPointInpath.invalid</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.isPointInpath.invalid</h1>
+<p class="desc">Verify isPointInPath throws exceptions with invalid inputs.</p>
+
+
+<script>
+var t = async_test("Verify isPointInPath throws exceptions with invalid inputs.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ // Testing invalid enumeration isPointInPath (w/ and w/o Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, 'gazonk'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(50, 50, 'gazonk'); });
+
+ // Testing invalid type isPointInPath with Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, undefined); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'evenodd'); });
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js
new file mode 100644
index 00000000000..f09eeb75264
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.invalid.worker.js
@@ -0,0 +1,46 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInpath.invalid
+// Description:Verify isPointInPath throws exceptions with invalid inputs.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify isPointInPath throws exceptions with invalid inputs.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ // Testing invalid enumeration isPointInPath (w/ and w/o Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, 'gazonk'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(50, 50, 'gazonk'); });
+
+ // Testing invalid type isPointInPath with Path object');
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(null, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(path, 50, 50, null); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath(undefined, 50, 50, undefined); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath([], 50, 50, 'evenodd'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'nonzero'); });
+ assert_throws_js(TypeError, function() { ctx.isPointInPath({}, 50, 50, 'evenodd'); });
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html
new file mode 100644
index 00000000000..945855231b7
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.html
@@ -0,0 +1,49 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.isPointInpath.multi.path</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.isPointInpath.multi.path</h1>
+<p class="desc">Verify the winding rule in isPointInPath works for path object.</p>
+
+
+<script>
+var t = async_test("Verify the winding rule in isPointInPath works for path object.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+
+ // Testing default isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50), true, "ctx.isPointInPath(path, 50, 50)", "true");
+ _assertSame(ctx.isPointInPath(path, 50, 50, undefined), true, "ctx.isPointInPath(path, 50, 50, undefined)", "true");
+ _assertSame(ctx.isPointInPath(path, NaN, 50), false, "ctx.isPointInPath(path, NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(path, 50, NaN), false, "ctx.isPointInPath(path, 50, NaN)", "false");
+
+ // Testing nonzero isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50, 'nonzero'), true, "ctx.isPointInPath(path, 50, 50, 'nonzero')", "true");
+
+ // Testing evenodd isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd'));
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js
new file mode 100644
index 00000000000..d3d4e60747b
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.isPointInpath.multi.path.worker.js
@@ -0,0 +1,44 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.isPointInpath.multi.path
+// Description:Verify the winding rule in isPointInPath works for path object.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify the winding rule in isPointInPath works for path object.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ canvas.width = 200;
+ canvas.height = 200;
+
+ // Testing default isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50), true, "ctx.isPointInPath(path, 50, 50)", "true");
+ _assertSame(ctx.isPointInPath(path, 50, 50, undefined), true, "ctx.isPointInPath(path, 50, 50, undefined)", "true");
+ _assertSame(ctx.isPointInPath(path, NaN, 50), false, "ctx.isPointInPath(path, NaN, 50)", "false");
+ _assertSame(ctx.isPointInPath(path, 50, NaN), false, "ctx.isPointInPath(path, 50, NaN)", "false");
+
+ // Testing nonzero isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ _assertSame(ctx.isPointInPath(path, 50, 50, 'nonzero'), true, "ctx.isPointInPath(path, 50, 50, 'nonzero')", "true");
+
+ // Testing evenodd isPointInPath with Path object');
+ path = new Path2D();
+ path.rect(0, 0, 100, 100);
+ path.rect(25, 25, 50, 50);
+ assert_false(ctx.isPointInPath(path, 50, 50, 'evenodd'));
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html
index 3247ededcc8..e0bc64617f9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js
index 980de5c1b28..6e02a1f149c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.basic.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html
index 5a15f9ece48..2561a2f5559 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(100, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js
index 024754ca0ea..ae4d85735ec 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(100, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(100, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html
index eaad8dabcce..9ca14a13935 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js
index 2a15c9e14d4..b6af21235f4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.ensuresubpath.2.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html
index fc697b9be59..a649d3a86da 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js
index de9d56be06e..9e4e24a06de 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nextpoint.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(-100, -100);
-ctx.lineTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(-100, -100);
+ ctx.lineTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html
index 82270be5344..35bc80d3369 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.html
@@ -17,15 +17,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-for (var arg1 of [Infinity, -Infinity, NaN]) {
- var converted = false;
- ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
- _assert(converted, "converted");
-}
-t.done();
+ for (var arg1 of [Infinity, -Infinity, NaN]) {
+ var converted = false;
+ ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
+ _assert(converted, "converted");
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js
index bf74ee5b504..5052c74b94f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.details.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-for (var arg1 of [Infinity, -Infinity, NaN]) {
- var converted = false;
- ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
- _assert(converted, "converted");
-}
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ for (var arg1 of [Infinity, -Infinity, NaN]) {
+ var converted = false;
+ ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
+ _assert(converted, "converted");
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html
index 02d77163fd2..5a144dd7f61 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.html
@@ -17,25 +17,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(Infinity, 50);
-ctx.lineTo(-Infinity, 50);
-ctx.lineTo(NaN, 50);
-ctx.lineTo(0, Infinity);
-ctx.lineTo(0, -Infinity);
-ctx.lineTo(0, NaN);
-ctx.lineTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(Infinity, 50);
+ ctx.lineTo(-Infinity, 50);
+ ctx.lineTo(NaN, 50);
+ ctx.lineTo(0, Infinity);
+ ctx.lineTo(0, -Infinity);
+ ctx.lineTo(0, NaN);
+ ctx.lineTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js
index 5161b4e4322..82921b7cd9a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.lineTo.nonfinite.worker.js
@@ -13,25 +13,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.lineTo(Infinity, 50);
-ctx.lineTo(-Infinity, 50);
-ctx.lineTo(NaN, 50);
-ctx.lineTo(0, Infinity);
-ctx.lineTo(0, -Infinity);
-ctx.lineTo(0, NaN);
-ctx.lineTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.lineTo(Infinity, 50);
+ ctx.lineTo(-Infinity, 50);
+ ctx.lineTo(NaN, 50);
+ ctx.lineTo(0, Infinity);
+ ctx.lineTo(0, -Infinity);
+ ctx.lineTo(0, NaN);
+ ctx.lineTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html
index 8363792c706..f9777c6ca8f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 10, 50);
-ctx.moveTo(100, 0);
-ctx.lineTo(10, 0);
-ctx.lineTo(10, 50);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 90,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 10, 50);
+ ctx.moveTo(100, 0);
+ ctx.lineTo(10, 0);
+ ctx.lineTo(10, 50);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 90,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js
index eca39660bce..0b1df374b67 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.basic.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.rect(0, 0, 10, 50);
-ctx.moveTo(100, 0);
-ctx.lineTo(10, 0);
-ctx.lineTo(10, 50);
-ctx.lineTo(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 90,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(0, 0, 10, 50);
+ ctx.moveTo(100, 0);
+ ctx.lineTo(10, 0);
+ ctx.lineTo(10, 50);
+ ctx.lineTo(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 90,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html
index 928c9783d44..0b56cbbfef3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 25);
-ctx.moveTo(100, 25);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 25);
+ ctx.moveTo(100, 25);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js
index 686f5ae84ad..9f49ea8a1ba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.multiple.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.moveTo(0, 25);
-ctx.moveTo(100, 25);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.moveTo(0, 25);
+ ctx.moveTo(100, 25);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html
index 89fda23ffc9..c2594c006ed 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.moveTo(100, 0);
-ctx.moveTo(100, 50);
-ctx.moveTo(0, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.moveTo(100, 0);
+ ctx.moveTo(100, 50);
+ ctx.moveTo(0, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js
index d00491c42bf..e3c9c8529d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.newsubpath.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.moveTo(0, 0);
-ctx.moveTo(100, 0);
-ctx.moveTo(100, 50);
-ctx.moveTo(0, 50);
-ctx.fillStyle = '#f00';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.moveTo(0, 0);
+ ctx.moveTo(100, 0);
+ ctx.moveTo(100, 50);
+ ctx.moveTo(0, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html
index 1a2e6cfe839..ea3eb34c767 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.html
@@ -17,24 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.moveTo(Infinity, 50);
-ctx.moveTo(-Infinity, 50);
-ctx.moveTo(NaN, 50);
-ctx.moveTo(0, Infinity);
-ctx.moveTo(0, -Infinity);
-ctx.moveTo(0, NaN);
-ctx.moveTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.moveTo(Infinity, 50);
+ ctx.moveTo(-Infinity, 50);
+ ctx.moveTo(NaN, 50);
+ ctx.moveTo(0, Infinity);
+ ctx.moveTo(0, -Infinity);
+ ctx.moveTo(0, NaN);
+ ctx.moveTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js
index ced534fb954..97e2bd72e34 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.moveTo.nonfinite.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.moveTo(Infinity, 50);
-ctx.moveTo(-Infinity, 50);
-ctx.moveTo(NaN, 50);
-ctx.moveTo(0, Infinity);
-ctx.moveTo(0, -Infinity);
-ctx.moveTo(0, NaN);
-ctx.moveTo(Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.moveTo(Infinity, 50);
+ ctx.moveTo(-Infinity, 50);
+ ctx.moveTo(NaN, 50);
+ ctx.moveTo(0, Infinity);
+ ctx.moveTo(0, -Infinity);
+ ctx.moveTo(0, NaN);
+ ctx.moveTo(Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html
index 46a83e112c5..4d14ce5585b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.quadraticCurveTo(100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.quadraticCurveTo(100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js
index a1dfa045d94..161e5f1a65f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.basic.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.moveTo(0, 25);
-ctx.quadraticCurveTo(100, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.moveTo(0, 25);
+ ctx.quadraticCurveTo(100, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
index 37662e46185..3e916f00c7d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(100, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(100, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js
index fe20e7b890f..95dcf2bed1c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.1.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(100, 50, 200, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 95,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(100, 50, 200, 50);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 95,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
index 2f18424749f..2fb05a26582 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(0, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(0, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js
index f840168f986..4beaf9dae2b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.ensuresubpath.2.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.beginPath();
-ctx.quadraticCurveTo(0, 25, 100, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 5,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.beginPath();
+ ctx.quadraticCurveTo(0, 25, 100, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 5,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html
index 1083f027e2c..ee4f333a08a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.html
@@ -17,41 +17,41 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.quadraticCurveTo(Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(NaN, 50, 0, 50);
-ctx.quadraticCurveTo(0, Infinity, 0, 50);
-ctx.quadraticCurveTo(0, -Infinity, 0, 50);
-ctx.quadraticCurveTo(0, NaN, 0, 50);
-ctx.quadraticCurveTo(0, 50, Infinity, 50);
-ctx.quadraticCurveTo(0, 50, -Infinity, 50);
-ctx.quadraticCurveTo(0, 50, NaN, 50);
-ctx.quadraticCurveTo(0, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, 0, -Infinity);
-ctx.quadraticCurveTo(0, 50, 0, NaN);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.quadraticCurveTo(Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(NaN, 50, 0, 50);
+ ctx.quadraticCurveTo(0, Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, -Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, NaN, 0, 50);
+ ctx.quadraticCurveTo(0, 50, Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, -Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, NaN, 50);
+ ctx.quadraticCurveTo(0, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, -Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, NaN);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js
index df17bd6d362..a61eb9a8cad 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.nonfinite.worker.js
@@ -13,41 +13,40 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.quadraticCurveTo(Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
-ctx.quadraticCurveTo(NaN, 50, 0, 50);
-ctx.quadraticCurveTo(0, Infinity, 0, 50);
-ctx.quadraticCurveTo(0, -Infinity, 0, 50);
-ctx.quadraticCurveTo(0, NaN, 0, 50);
-ctx.quadraticCurveTo(0, 50, Infinity, 50);
-ctx.quadraticCurveTo(0, 50, -Infinity, 50);
-ctx.quadraticCurveTo(0, 50, NaN, 50);
-ctx.quadraticCurveTo(0, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, 0, -Infinity);
-ctx.quadraticCurveTo(0, 50, 0, NaN);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
-ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
-ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
-ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
-ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
-ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
-ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.quadraticCurveTo(Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(-Infinity, 50, 0, 50);
+ ctx.quadraticCurveTo(NaN, 50, 0, 50);
+ ctx.quadraticCurveTo(0, Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, -Infinity, 0, 50);
+ ctx.quadraticCurveTo(0, NaN, 0, 50);
+ ctx.quadraticCurveTo(0, 50, Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, -Infinity, 50);
+ ctx.quadraticCurveTo(0, 50, NaN, 50);
+ ctx.quadraticCurveTo(0, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, -Infinity);
+ ctx.quadraticCurveTo(0, 50, 0, NaN);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, 50);
+ ctx.quadraticCurveTo(Infinity, 50, Infinity, Infinity);
+ ctx.quadraticCurveTo(Infinity, 50, 0, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, 50);
+ ctx.quadraticCurveTo(0, Infinity, Infinity, Infinity);
+ ctx.quadraticCurveTo(0, Infinity, 0, Infinity);
+ ctx.quadraticCurveTo(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html
index 60ba483f14d..92c9377d6f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.html
@@ -17,24 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-1, 1.05);
-ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-1, 1.05);
+ ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js
index 298001b212e..04fd6e904d7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.scaled.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1000, 1000);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 0.055;
-ctx.beginPath();
-ctx.moveTo(-1, 1.05);
-ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1000, 1000);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 0.055;
+ ctx.beginPath();
+ ctx.moveTo(-1, 1.05);
+ ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html
index 21cb175d598..ea42d669cb5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-1000, 1050);
-ctx.quadraticCurveTo(0, -1000, 1200, 1050);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-1000, 1050);
+ ctx.quadraticCurveTo(0, -1000, 1200, 1050);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js
index f7aac9135af..9f2afea09d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.quadraticCurveTo.shape.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 55;
-ctx.beginPath();
-ctx.moveTo(-1000, 1050);
-ctx.quadraticCurveTo(0, -1000, 1200, 1050);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 55;
+ ctx.beginPath();
+ ctx.moveTo(-1000, 1050);
+ ctx.quadraticCurveTo(0, -1000, 1200, 1050);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html
index 5214bd8dc05..e8d874709d8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js
index dcf3dc2a4bc..c8eb3838f9d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.basic.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html
index 70db3725a11..6f618743904 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.rect(100, 50, 100, 100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.rect(100, 50, 100, 100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js
index 6ee09ef8d43..f40868730b3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.closed.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.rect(100, 50, 100, 100);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.rect(100, 50, 100, 100);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html
index bb4bfc0c906..e4d5ece132b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.rect(200, 100, 400, 1000);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.rect(200, 100, 400, 1000);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js
index f576ac43664..fcf9d0526f9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.rect(200, 100, 400, 1000);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.rect(200, 100, 400, 1000);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html
index 1f945a858e9..d6bad78abb6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.rect(150, 150, 2000, 2000);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.rect(150, 150, 2000, 2000);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js
index 8813ed81522..84c1b71d71d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.end.2.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.rect(150, 150, 2000, 2000);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.rect(150, 150, 2000, 2000);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html
index 8c9effe2a54..730e2e887a7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 50, 25);
-ctx.rect(100, 0, -50, 25);
-ctx.rect(0, 50, 50, -25);
-ctx.rect(100, 50, -50, -25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 50, 25);
+ ctx.rect(100, 0, -50, 25);
+ ctx.rect(0, 50, 50, -25);
+ ctx.rect(100, 50, -50, -25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js
index ea01c6d3f07..44449e85e2c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.negative.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.rect(0, 0, 50, 25);
-ctx.rect(100, 0, -50, 25);
-ctx.rect(0, 50, 50, -25);
-ctx.rect(100, 50, -50, -25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.rect(0, 0, 50, 25);
+ ctx.rect(100, 0, -50, 25);
+ ctx.rect(0, 50, 50, -25);
+ ctx.rect(100, 50, -50, -25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html
index 1dcfbe94869..05b972e045d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.rect(200, 25, 1, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.rect(200, 25, 1, 1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js
index 44962c5f2f4..bdf4a926c1f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.newsubpath.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.rect(200, 25, 1, 1);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.rect(200, 25, 1, 1);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html
index 7f92cf5e48c..16d76aaf185 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.html
@@ -17,41 +17,41 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.rect(Infinity, 50, 1, 1);
-ctx.rect(-Infinity, 50, 1, 1);
-ctx.rect(NaN, 50, 1, 1);
-ctx.rect(0, Infinity, 1, 1);
-ctx.rect(0, -Infinity, 1, 1);
-ctx.rect(0, NaN, 1, 1);
-ctx.rect(0, 50, Infinity, 1);
-ctx.rect(0, 50, -Infinity, 1);
-ctx.rect(0, 50, NaN, 1);
-ctx.rect(0, 50, 1, Infinity);
-ctx.rect(0, 50, 1, -Infinity);
-ctx.rect(0, 50, 1, NaN);
-ctx.rect(Infinity, Infinity, 1, 1);
-ctx.rect(Infinity, Infinity, Infinity, 1);
-ctx.rect(Infinity, Infinity, Infinity, Infinity);
-ctx.rect(Infinity, Infinity, 1, Infinity);
-ctx.rect(Infinity, 50, Infinity, 1);
-ctx.rect(Infinity, 50, Infinity, Infinity);
-ctx.rect(Infinity, 50, 1, Infinity);
-ctx.rect(0, Infinity, Infinity, 1);
-ctx.rect(0, Infinity, Infinity, Infinity);
-ctx.rect(0, Infinity, 1, Infinity);
-ctx.rect(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.rect(Infinity, 50, 1, 1);
+ ctx.rect(-Infinity, 50, 1, 1);
+ ctx.rect(NaN, 50, 1, 1);
+ ctx.rect(0, Infinity, 1, 1);
+ ctx.rect(0, -Infinity, 1, 1);
+ ctx.rect(0, NaN, 1, 1);
+ ctx.rect(0, 50, Infinity, 1);
+ ctx.rect(0, 50, -Infinity, 1);
+ ctx.rect(0, 50, NaN, 1);
+ ctx.rect(0, 50, 1, Infinity);
+ ctx.rect(0, 50, 1, -Infinity);
+ ctx.rect(0, 50, 1, NaN);
+ ctx.rect(Infinity, Infinity, 1, 1);
+ ctx.rect(Infinity, Infinity, Infinity, 1);
+ ctx.rect(Infinity, Infinity, Infinity, Infinity);
+ ctx.rect(Infinity, Infinity, 1, Infinity);
+ ctx.rect(Infinity, 50, Infinity, 1);
+ ctx.rect(Infinity, 50, Infinity, Infinity);
+ ctx.rect(Infinity, 50, 1, Infinity);
+ ctx.rect(0, Infinity, Infinity, 1);
+ ctx.rect(0, Infinity, Infinity, Infinity);
+ ctx.rect(0, Infinity, 1, Infinity);
+ ctx.rect(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js
index 6fa1e82ae48..307a5ec08f7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.nonfinite.worker.js
@@ -13,41 +13,40 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.rect(Infinity, 50, 1, 1);
-ctx.rect(-Infinity, 50, 1, 1);
-ctx.rect(NaN, 50, 1, 1);
-ctx.rect(0, Infinity, 1, 1);
-ctx.rect(0, -Infinity, 1, 1);
-ctx.rect(0, NaN, 1, 1);
-ctx.rect(0, 50, Infinity, 1);
-ctx.rect(0, 50, -Infinity, 1);
-ctx.rect(0, 50, NaN, 1);
-ctx.rect(0, 50, 1, Infinity);
-ctx.rect(0, 50, 1, -Infinity);
-ctx.rect(0, 50, 1, NaN);
-ctx.rect(Infinity, Infinity, 1, 1);
-ctx.rect(Infinity, Infinity, Infinity, 1);
-ctx.rect(Infinity, Infinity, Infinity, Infinity);
-ctx.rect(Infinity, Infinity, 1, Infinity);
-ctx.rect(Infinity, 50, Infinity, 1);
-ctx.rect(Infinity, 50, Infinity, Infinity);
-ctx.rect(Infinity, 50, 1, Infinity);
-ctx.rect(0, Infinity, Infinity, 1);
-ctx.rect(0, Infinity, Infinity, Infinity);
-ctx.rect(0, Infinity, 1, Infinity);
-ctx.rect(0, 50, Infinity, Infinity);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.rect(Infinity, 50, 1, 1);
+ ctx.rect(-Infinity, 50, 1, 1);
+ ctx.rect(NaN, 50, 1, 1);
+ ctx.rect(0, Infinity, 1, 1);
+ ctx.rect(0, -Infinity, 1, 1);
+ ctx.rect(0, NaN, 1, 1);
+ ctx.rect(0, 50, Infinity, 1);
+ ctx.rect(0, 50, -Infinity, 1);
+ ctx.rect(0, 50, NaN, 1);
+ ctx.rect(0, 50, 1, Infinity);
+ ctx.rect(0, 50, 1, -Infinity);
+ ctx.rect(0, 50, 1, NaN);
+ ctx.rect(Infinity, Infinity, 1, 1);
+ ctx.rect(Infinity, Infinity, Infinity, 1);
+ ctx.rect(Infinity, Infinity, Infinity, Infinity);
+ ctx.rect(Infinity, Infinity, 1, Infinity);
+ ctx.rect(Infinity, 50, Infinity, 1);
+ ctx.rect(Infinity, 50, Infinity, Infinity);
+ ctx.rect(Infinity, 50, 1, Infinity);
+ ctx.rect(0, Infinity, Infinity, 1);
+ ctx.rect(0, Infinity, Infinity, Infinity);
+ ctx.rect(0, Infinity, 1, Infinity);
+ ctx.rect(0, 50, Infinity, Infinity);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html
index 36c3f074194..af97fa6d38c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.rect(45, 20, 10, 10);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.rect(45, 20, 10, 10);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js
index 84c2687f309..495d016e80c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.selfintersect.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.rect(45, 20, 10, 10);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.rect(45, 20, 10, 10);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html
index c4f4128188b..a7f79c5223a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.rect(0, 0, 50, 50);
-ctx.rect(100, 50, -50, -50);
-ctx.rect(0, 25, 100, -25);
-ctx.rect(100, 25, -100, 25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.rect(0, 0, 50, 50);
+ ctx.rect(100, 50, -50, -50);
+ ctx.rect(0, 25, 100, -25);
+ ctx.rect(100, 25, -100, 25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js
index 90a3d05e8b2..45ff0427e1c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.winding.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.rect(0, 0, 50, 50);
-ctx.rect(100, 50, -50, -50);
-ctx.rect(0, 25, 100, -25);
-ctx.rect(100, 25, -100, 25);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.rect(0, 0, 50, 50);
+ ctx.rect(100, 50, -50, -50);
+ ctx.rect(0, 25, 100, -25);
+ ctx.rect(100, 25, -100, 25);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html
index 90c0bb1f68a..45dac2079d3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(0, 50, 100, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(0, 50, 100, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js
index 4d080710d07..de6fb58c8a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(0, 50, 100, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(0, 50, 100, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html
index 4c3ae6f6ddf..0386ea06e70 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, -100, 0, 250);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, -100, 0, 250);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js
index 93d5a528759..8e323d2dd08 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, -100, 0, 250);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, -100, 0, 250);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html
index 86bd7494186..12990409293 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js
index 6403de43c03..5e6f490c73e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.3.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html
index 063ef2ba1d5..93da1300de3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.rect(100, 25, 0, 0);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.rect(100, 25, 0, 0);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js
index 87fd6985663..e19da3b9177 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.4.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.rect(100, 25, 0, 0);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.rect(100, 25, 0, 0);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html
index 0fa0b075504..45a7f03813f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.rect(100, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.rect(100, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js
index 77851f54d3e..d39a7415738 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.5.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.rect(100, 25, 0, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.rect(100, 25, 0, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html
index a3cf7b60ac7..ac74e206608 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.rect(100, 25, 1000, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.rect(100, 25, 1000, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js
index 5db284837c4..a567359c30a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.rect.zero.6.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.rect(100, 25, 1000, 0);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.rect(100, 25, 1000, 0);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html
index 479ab00cd7d..f7e80a0119f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.html
@@ -6,50 +6,50 @@
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.path.roundrect.1.radius.dompoint</h1>
-<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.</p>
+<p class="desc">Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.</p>
<script>
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.");
+var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html
new file mode 100644
index 00000000000..4ea78c32d12
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.roundrect.1.radius.dompoint.single argument</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.roundrect.1.radius.dompoint.single argument</h1>
+<p class="desc">Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.</p>
+
+
+<script>
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20));
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js
new file mode 100644
index 00000000000..b93d88e89cd
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.single argument.worker.js
@@ -0,0 +1,50 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompoint.single argument
+// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPoint, it applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, new DOMPoint(40, 20));
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js
index ba4fb4e611f..06d787437e7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompoint.worker.js
@@ -1,51 +1,50 @@
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompoint
-// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.
+// Description:Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.");
+var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPoint, it applies to all corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html
index 18ff259e66c..97084a446fd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.html
@@ -6,50 +6,50 @@
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.path.roundrect.1.radius.dompointinit</h1>
-<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.</p>
+<p class="desc">Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.</p>
<script>
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.");
+var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html
new file mode 100644
index 00000000000..10c5c14cff0
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.html
@@ -0,0 +1,55 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.roundrect.1.radius.dompointinit.single.argument</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.roundrect.1.radius.dompointinit.single.argument</h1>
+<p class="desc">Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.</p>
+
+
+<script>
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20});
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js
new file mode 100644
index 00000000000..a62370677be
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.single.argument.worker.js
@@ -0,0 +1,50 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompointinit.single.argument
+// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a DOMPointInit, applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, {x: 40, y: 20});
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js
index 589950c04e0..56c8e1fcef5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.dompointinit.worker.js
@@ -1,51 +1,50 @@
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.dompointinit
-// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.
+// Description:Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.");
+var t = async_test("Verify that when one radius is given to roundRect(), specified as a DOMPointInit, applies to all corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html
index 4761bb5e5e8..33574eeaa0e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html
new file mode 100644
index 00000000000..b2c826ff386
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.html
@@ -0,0 +1,35 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.roundrect.1.radius.double.single.argument</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.roundrect.1.radius.double.single.argument</h1>
+<p class="desc">Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.</p>
+
+
+<script>
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, 20);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js
new file mode 100644
index 00000000000..04350e81aac
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.single.argument.worker.js
@@ -0,0 +1,30 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.roundrect.1.radius.double.single.argument
+// Description:Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Verify that when one radius is given to roundRect() as a non-array argument, specified as a double, it applies to all corners.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, 20);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js
index 57f28c77786..ef9da08d618 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.1.radius.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
index c96ed08f05c..7f67c42ed48 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.html
@@ -17,31 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js
index 7e7a4efddc0..5d0387d0d1f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompoint.worker.js
@@ -13,31 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
index 02b889c7592..2ac0347d96b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.html
@@ -6,42 +6,42 @@
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.path.roundrect.2.radii.1.dompointinit</h1>
-<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.</p>
+<p class="desc">Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.</p>
<script>
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.");
+var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js
index fcc3cb088ae..240a36e846a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.dompointinit.worker.js
@@ -1,43 +1,42 @@
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.1.dompointinit
-// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.
+// Description:Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.");
+var t = async_test("Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left and bottom-right corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html
index 2a6a030237b..791e59ee7e0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js
index 6d4d029b1c8..0fc351c3d62 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.1.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
index bc6e27c6830..d0b085e1703 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.html
@@ -17,31 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js
index fead59e863b..4c6bb06bdb7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompoint.worker.js
@@ -13,31 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
index fcca1c739fc..380dd269978 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.html
@@ -6,42 +6,42 @@
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.path.roundrect.2.radii.2.dompointinit</h1>
-<p class="desc">Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.</p>
+<p class="desc">Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.</p>
<script>
-var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.");
+var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js
index ab334e4ca06..e8cdd2c0153 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.dompointinit.worker.js
@@ -1,43 +1,42 @@
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.roundrect.2.radii.2.dompointinit
-// Description:Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.
+// Description:Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.");
+var t = async_test("Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right and bottom-left corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html
index 2bc67375669..b7b25727b9e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js
index d355852a5ce..756328682df 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.2.radii.2.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
index f3388e6562e..b7f3e53261a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js
index 36c6401bf3d..9ac4d731c3a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
index dd96e859ea1..93f89159b1d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js
index a497d5788ba..9d00729ce9e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html
index 4c5f57122cd..976458bc5f0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js
index 171a2ae5e6f..c4e1c4fc039 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.1.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
index 3459ac27bb2..1a89c28d15f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.html
@@ -17,31 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js
index 9588780f978..4e4df3a6013 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompoint.worker.js
@@ -13,31 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
index 6476be489f7..82ceb6a7bcc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.html
@@ -6,42 +6,42 @@
<script src="/html/canvas/resources/canvas-tests.js"></script>
<h1>2d.path.roundrect.3.radii.2.dompointinit</h1>
-<p class="desc">Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.</p>
+<p class="desc">Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.</p>
<script>
-var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.");
+var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js
index 42dead8509b..1333e2386d7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.dompointinit.worker.js
@@ -1,43 +1,42 @@
// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
// OffscreenCanvas test in a worker:2d.path.roundrect.3.radii.2.dompointinit
-// Description:Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.
+// Description:Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.
// Note:
importScripts("/resources/testharness.js");
importScripts("/html/canvas/resources/canvas-tests.js");
-var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.");
+var t = async_test("Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.");
var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html
index 652745e0bed..b466956d580 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js
index e3929fbfdbb..027dbae52ac 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.2.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
index 1c295143c81..897aeb2685f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js
index c8e08ec297f..8a80623fc9a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
index f8e62a5bf62..e1e055cb643 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js
index 0fe2b89877a..d3b188dd7f5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html
index ff1301d9cd4..a0e0553364f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js
index 2422435d526..177e7c5f6d1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.3.radii.3.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
index 3110983f7f8..72e8d6ce335 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js
index 3bdb12e0298..f27f696f1c7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
index 976b39a1021..df6bb11e02c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js
index 86b43ad2a19..2f9d2eb30f8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-left corner
-_assertPixel(canvas, 20,1, 255,0,0,255);
-_assertPixel(canvas, 41,1, 0,255,0,255);
-_assertPixel(canvas, 1,10, 255,0,0,255);
-_assertPixel(canvas, 1,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-left corner
+ _assertPixel(canvas, 20,1, 255,0,0,255);
+ _assertPixel(canvas, 41,1, 0,255,0,255);
+ _assertPixel(canvas, 1,10, 255,0,0,255);
+ _assertPixel(canvas, 1,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html
index c75d6420c9c..b669a7bb6af 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js
index 925c93b0c90..9658a39cfbb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.1.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
index 33d861d6dce..b387d88990b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js
index 12d1a8c8e63..83d3f66b3cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
index b088c2e717b..76719124e2b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js
index 49a247a2663..21766040b46 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// top-right corner
-_assertPixel(canvas, 79,1, 255,0,0,255);
-_assertPixel(canvas, 58,1, 0,255,0,255);
-_assertPixel(canvas, 98,10, 255,0,0,255);
-_assertPixel(canvas, 98,21, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // top-right corner
+ _assertPixel(canvas, 79,1, 255,0,0,255);
+ _assertPixel(canvas, 58,1, 0,255,0,255);
+ _assertPixel(canvas, 98,10, 255,0,0,255);
+ _assertPixel(canvas, 98,21, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html
index 71395e0e9ee..001cb8429ca 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js
index f868c6272ef..b9935a1bd9b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.2.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
index 4922bf37f22..5c8c686086e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js
index 2da2f3591c6..819b1a39867 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
index 3b6f2fd863f..1b94b7d7ed5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js
index 65a3feb36f4..e4bd04aa296 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-right corner
-_assertPixel(canvas, 79,48, 255,0,0,255);
-_assertPixel(canvas, 58,48, 0,255,0,255);
-_assertPixel(canvas, 98,39, 255,0,0,255);
-_assertPixel(canvas, 98,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ // bottom-right corner
+ _assertPixel(canvas, 79,48, 255,0,0,255);
+ _assertPixel(canvas, 58,48, 0,255,0,255);
+ _assertPixel(canvas, 98,39, 255,0,0,255);
+ _assertPixel(canvas, 98,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html
index 3dd2af98007..2a76d2b7b1f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js
index a327ceac157..ada627b4695 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.3.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
index d61a3133cc4..ce86e45e8b3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js
index d8a121e6da9..770291c6f9a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompoint.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
index 94ffc00433e..f0ec6c3b999 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.html
@@ -17,26 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js
index b7babb52961..48310c6a30b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.dompointinit.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
-// bottom-left corner
-_assertPixel(canvas, 20,48, 255,0,0,255);
-_assertPixel(canvas, 41,48, 0,255,0,255);
-_assertPixel(canvas, 1,39, 255,0,0,255);
-_assertPixel(canvas, 1,28, 0,255,0,255);
-
-// other corners
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ // bottom-left corner
+ _assertPixel(canvas, 20,48, 255,0,0,255);
+ _assertPixel(canvas, 41,48, 0,255,0,255);
+ _assertPixel(canvas, 1,39, 255,0,0,255);
+ _assertPixel(canvas, 1,28, 0,255,0,255);
+ // other corners
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html
index 4ab25818476..6940622cf03 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.html
@@ -17,19 +17,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js
index ad4cca49536..e97ebd98ff7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.4.radii.4.double.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html
new file mode 100644
index 00000000000..97b322971c3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.html
@@ -0,0 +1,34 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.roundrect.badinput</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.roundrect.badinput</h1>
+<p class="desc">roundRect() throws or does not throw errors given the strange inputs.</p>
+
+
+<script>
+var t = async_test("roundRect() throws or does not throw errors given the strange inputs.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit
+ ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0
+ ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit »
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, 0n); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, { x: 0n }); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); });
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js
new file mode 100644
index 00000000000..461dee89ade
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.badinput.worker.js
@@ -0,0 +1,29 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.roundrect.badinput
+// Description:roundRect() throws or does not throw errors given the strange inputs.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("roundRect() throws or does not throw errors given the strange inputs.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.roundRect(0, 0, 100, 100, { foo: "bar" }); //=> DOMPointInit
+ ctx.roundRect(0, 0, 100, 100, undefined); //=> "missing" -> 0
+ ctx.roundRect(0, 0, 100, 100, [[]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [[25]]); //=> « DOMPointInit »
+ ctx.roundRect(0, 0, 100, 100, [undefined]); //=> « DOMPointInit »
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, 0n); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, { x: 0n }); });
+ assert_throws_js(TypeError, function() { ctx.roundRect(0, 0, 100, 100, [{ x: 0n }]); });
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html
index 1b4abf012c7..7407ead9cf5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.roundRect(100, 50, 100, 100, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.roundRect(100, 50, 100, 100, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js
index e0f1b81aa42..5a9530a6833 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.closed.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 200;
-ctx.lineJoin = 'miter';
-ctx.roundRect(100, 50, 100, 100, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 200;
+ ctx.lineJoin = 'miter';
+ ctx.roundRect(100, 50, 100, 100, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html
index 5c6b3cd537d..d73b82bee4a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(200, 100, 400, 1000, [0]);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(200, 100, 400, 1000, [0]);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js
index 1ec22bdb6a7..9428df5bbd1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(200, 100, 400, 1000, [0]);
-ctx.lineTo(-2000, -1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(200, 100, 400, 1000, [0]);
+ ctx.lineTo(-2000, -1000);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html
index 3913f69d412..ce9b44ead12 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.roundRect(150, 150, 2000, 2000, [0]);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.roundRect(150, 150, 2000, 2000, [0]);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js
index c3085d53c3b..28f1ca1787a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.2.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 450;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'bevel';
-ctx.roundRect(150, 150, 2000, 2000, [0]);
-ctx.lineTo(160, 160);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 450;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'bevel';
+ ctx.roundRect(150, 150, 2000, 2000, [0]);
+ ctx.lineTo(160, 160);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html
index 349f13485c0..72183ecd05e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.html
@@ -17,21 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
-ctx.lineTo(-1, -1);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
+ ctx.lineTo(-1, -1);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js
index 52b9c442838..57cb328cfa5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.3.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
-ctx.lineTo(-1, -1);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
+ ctx.lineTo(-1, -1);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html
index 3c99e3970a1..c4fdee5958e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.html
@@ -17,21 +17,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
-ctx.lineTo(-150, -150);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
+ ctx.lineTo(-150, -150);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js
index 1d57b8978f2..a97a37d1572 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.end.4.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 10;
-ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
-ctx.lineTo(-150, -150);
-ctx.stroke();
-_assertPixel(canvas, 1,1, 0,255,0,255);
-_assertPixel(canvas, 98,1, 0,255,0,255);
-_assertPixel(canvas, 1,48, 0,255,0,255);
-_assertPixel(canvas, 98,48, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 10;
+ ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
+ ctx.lineTo(-150, -150);
+ ctx.stroke();
+ _assertPixel(canvas, 1,1, 0,255,0,255);
+ _assertPixel(canvas, 98,1, 0,255,0,255);
+ _assertPixel(canvas, 1,48, 0,255,0,255);
+ _assertPixel(canvas, 98,48, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html
index e3696ca1a5b..aa836572448 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.html
@@ -17,29 +17,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
-ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
-ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
-ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
-ctx.fill();
-// All rects drawn
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-// Correct corners are rounded.
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
+ ctx.fill();
+ // All rects drawn
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ // Correct corners are rounded.
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js
index c34c20397a8..14459238ed1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.negative.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#0f0';
-ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
-ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
-ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
-ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
-ctx.fill();
-// All rects drawn
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-// Correct corners are rounded.
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#0f0';
+ ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
+ ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
+ ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
+ ctx.fill();
+ // All rects drawn
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ // Correct corners are rounded.
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html
index 6d0a8149077..3ad7e5bb5b9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.roundRect(200, 25, 1, 1, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.roundRect(200, 25, 1, 1, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js
index c6f7934bee9..757327c60d3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.newsubpath.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-50, 25);
-ctx.roundRect(200, 25, 1, 1, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-50, 25);
+ ctx.roundRect(200, 25, 1, 1, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html
index 29773503013..adddc7b9b89 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.html
@@ -17,100 +17,100 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.roundRect(Infinity, 50, 1, 1, [0]);
-ctx.roundRect(-Infinity, 50, 1, 1, [0]);
-ctx.roundRect(NaN, 50, 1, 1, [0]);
-ctx.roundRect(0, Infinity, 1, 1, [0]);
-ctx.roundRect(0, -Infinity, 1, 1, [0]);
-ctx.roundRect(0, NaN, 1, 1, [0]);
-ctx.roundRect(0, 50, Infinity, 1, [0]);
-ctx.roundRect(0, 50, -Infinity, 1, [0]);
-ctx.roundRect(0, 50, NaN, 1, [0]);
-ctx.roundRect(0, 50, 1, Infinity, [0]);
-ctx.roundRect(0, 50, 1, -Infinity, [0]);
-ctx.roundRect(0, 50, 1, NaN, [0]);
-ctx.roundRect(0, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(0, Infinity, 1, Infinity, [0]);
-ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, Infinity, Infinity, [0]);
-ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
-ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.roundRect(Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(-Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(NaN, 50, 1, 1, [0]);
+ ctx.roundRect(0, Infinity, 1, 1, [0]);
+ ctx.roundRect(0, -Infinity, 1, 1, [0]);
+ ctx.roundRect(0, NaN, 1, 1, [0]);
+ ctx.roundRect(0, 50, Infinity, 1, [0]);
+ ctx.roundRect(0, 50, -Infinity, 1, [0]);
+ ctx.roundRect(0, 50, NaN, 1, [0]);
+ ctx.roundRect(0, 50, 1, Infinity, [0]);
+ ctx.roundRect(0, 50, 1, -Infinity, [0]);
+ ctx.roundRect(0, 50, 1, NaN, [0]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js
index 68d0d8a09a3..d6d44d6ffe0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.nonfinite.worker.js
@@ -13,100 +13,99 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.moveTo(0, 0);
-ctx.lineTo(100, 0);
-ctx.roundRect(Infinity, 50, 1, 1, [0]);
-ctx.roundRect(-Infinity, 50, 1, 1, [0]);
-ctx.roundRect(NaN, 50, 1, 1, [0]);
-ctx.roundRect(0, Infinity, 1, 1, [0]);
-ctx.roundRect(0, -Infinity, 1, 1, [0]);
-ctx.roundRect(0, NaN, 1, 1, [0]);
-ctx.roundRect(0, 50, Infinity, 1, [0]);
-ctx.roundRect(0, 50, -Infinity, 1, [0]);
-ctx.roundRect(0, 50, NaN, 1, [0]);
-ctx.roundRect(0, 50, 1, Infinity, [0]);
-ctx.roundRect(0, 50, 1, -Infinity, [0]);
-ctx.roundRect(0, 50, 1, NaN, [0]);
-ctx.roundRect(0, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
-ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
-ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
-ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
-ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
-ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
-ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
-ctx.roundRect(0, Infinity, 1, Infinity, [0]);
-ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
-ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
-ctx.roundRect(0, 50, Infinity, Infinity, [0]);
-ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
-ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
-ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
-ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
-ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
-ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
-ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
-ctx.lineTo(100, 50);
-ctx.lineTo(0, 50);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 90,45, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.moveTo(0, 0);
+ ctx.lineTo(100, 0);
+ ctx.roundRect(Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(-Infinity, 50, 1, 1, [0]);
+ ctx.roundRect(NaN, 50, 1, 1, [0]);
+ ctx.roundRect(0, Infinity, 1, 1, [0]);
+ ctx.roundRect(0, -Infinity, 1, 1, [0]);
+ ctx.roundRect(0, NaN, 1, 1, [0]);
+ ctx.roundRect(0, 50, Infinity, 1, [0]);
+ ctx.roundRect(0, 50, -Infinity, 1, [0]);
+ ctx.roundRect(0, 50, NaN, 1, [0]);
+ ctx.roundRect(0, 50, 1, Infinity, [0]);
+ ctx.roundRect(0, 50, 1, -Infinity, [0]);
+ ctx.roundRect(0, 50, 1, NaN, [0]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN]);
+ ctx.roundRect(0, 50, 1, 1, [Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [-Infinity,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [NaN,0,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,-Infinity,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,NaN,0,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,-Infinity,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,NaN,0]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,-Infinity]);
+ ctx.roundRect(0, 50, 1, 1, [0,0,0,NaN]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [0]);
+ ctx.roundRect(Infinity, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(Infinity, 50, 1, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [0]);
+ ctx.roundRect(0, Infinity, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [0]);
+ ctx.roundRect(0, Infinity, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, Infinity, 1, 1, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [0]);
+ ctx.roundRect(0, 50, Infinity, Infinity, [Infinity]);
+ ctx.roundRect(0, 50, Infinity, 1, [Infinity]);
+ ctx.roundRect(0, 50, 1, Infinity, [Infinity]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
+ ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
+ ctx.lineTo(100, 50);
+ ctx.lineTo(0, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 90,45, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html
index c1916bf78f2..db4d871f9f6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.html
@@ -17,24 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js
index 9da41478d91..27076dbe21f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.1.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html
index f2a69c4ffc7..985942ca361 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.html
@@ -17,24 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js
index f0d3f57ca48..5b6de579ae1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.intersecting.2.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 2,25, 0,255,0,255);
-_assertPixel(canvas, 50,1, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 50,48, 0,255,0,255);
-_assertPixel(canvas, 97,25, 0,255,0,255);
-_assertPixel(canvas, 1,1, 255,0,0,255);
-_assertPixel(canvas, 98,1, 255,0,0,255);
-_assertPixel(canvas, 1,48, 255,0,0,255);
-_assertPixel(canvas, 98,48, 255,0,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixel(canvas, 2,25, 0,255,0,255);
+ _assertPixel(canvas, 50,1, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 50,48, 0,255,0,255);
+ _assertPixel(canvas, 97,25, 0,255,0,255);
+ _assertPixel(canvas, 1,1, 255,0,0,255);
+ _assertPixel(canvas, 98,1, 255,0,0,255);
+ _assertPixel(canvas, 1,48, 255,0,0,255);
+ _assertPixel(canvas, 98,48, 255,0,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html
index 55e344d3749..60a7bebd24c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.html
@@ -17,16 +17,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
-t.done();
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js
index 050e5f7f007..554a1ac078e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.negative.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html
new file mode 100644
index 00000000000..26a69afad07
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.html
@@ -0,0 +1,50 @@
+<!DOCTYPE html>
+<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+<title>OffscreenCanvas test: 2d.path.roundrect.radius.noargument</title>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/html/canvas/resources/canvas-tests.js"></script>
+
+<h1>2d.path.roundrect.radius.noargument</h1>
+<p class="desc">Check that roundRect draws a rectangle when no radii are provided.</p>
+
+
+<script>
+var t = async_test("Check that roundRect draws a rectangle when no radii are provided.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(10, 10, 80, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ // upper left corner (10, 10)
+ _assertPixel(canvas, 10,9, 255,0,0,255);
+ _assertPixel(canvas, 9,10, 255,0,0,255);
+ _assertPixel(canvas, 10,10, 0,255,0,255);
+
+ // upper right corner (89, 10)
+ _assertPixel(canvas, 90,10, 255,0,0,255);
+ _assertPixel(canvas, 89,9, 255,0,0,255);
+ _assertPixel(canvas, 89,10, 0,255,0,255);
+
+ // lower right corner (89, 39)
+ _assertPixel(canvas, 89,40, 255,0,0,255);
+ _assertPixel(canvas, 90,39, 255,0,0,255);
+ _assertPixel(canvas, 89,39, 0,255,0,255);
+
+ // lower left corner (10, 30)
+ _assertPixel(canvas, 9,39, 255,0,0,255);
+ _assertPixel(canvas, 10,40, 255,0,0,255);
+ _assertPixel(canvas, 10,39, 0,255,0,255);
+ t.done();
+
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js
new file mode 100644
index 00000000000..1f6227786b6
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.noargument.worker.js
@@ -0,0 +1,45 @@
+// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+// OffscreenCanvas test in a worker:2d.path.roundrect.radius.noargument
+// Description:Check that roundRect draws a rectangle when no radii are provided.
+// Note:
+
+importScripts("/resources/testharness.js");
+importScripts("/html/canvas/resources/canvas-tests.js");
+
+var t = async_test("Check that roundRect draws a rectangle when no radii are provided.");
+var t_pass = t.done.bind(t);
+var t_fail = t.step_func(function(reason) {
+ throw reason;
+});
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.roundRect(10, 10, 80, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ // upper left corner (10, 10)
+ _assertPixel(canvas, 10,9, 255,0,0,255);
+ _assertPixel(canvas, 9,10, 255,0,0,255);
+ _assertPixel(canvas, 10,10, 0,255,0,255);
+
+ // upper right corner (89, 10)
+ _assertPixel(canvas, 90,10, 255,0,0,255);
+ _assertPixel(canvas, 89,9, 255,0,0,255);
+ _assertPixel(canvas, 89,10, 0,255,0,255);
+
+ // lower right corner (89, 39)
+ _assertPixel(canvas, 89,40, 255,0,0,255);
+ _assertPixel(canvas, 90,39, 255,0,0,255);
+ _assertPixel(canvas, 89,39, 0,255,0,255);
+
+ // lower left corner (10, 30)
+ _assertPixel(canvas, 9,39, 255,0,0,255);
+ _assertPixel(canvas, 10,40, 255,0,0,255);
+ _assertPixel(canvas, 10,39, 0,255,0,255);
+ t.done();
+});
+done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html
index 530efe46b1f..763113e4388 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.html
@@ -17,11 +17,11 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
-t.done();
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js
index 3209e421de6..fefd1b4dd39 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.none.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html
index c667dc690af..ce330875fb3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.html
@@ -17,11 +17,11 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
-t.done();
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js
index 3b05057eda3..e1250afac70 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.radius.toomany.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html
index 0ec25354903..15ee6f49581 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 100, 50, [0]);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.roundRect(45, 20, 10, 10, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 100, 50, [0]);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.roundRect(45, 20, 10, 10, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js
index 8b6221414ba..91741110fc7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.selfintersect.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 100, 50, [0]);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 90;
-ctx.beginPath();
-ctx.roundRect(45, 20, 10, 10, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 100, 50, [0]);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 90;
+ ctx.beginPath();
+ ctx.roundRect(45, 20, 10, 10, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html
index e7f52fbf292..47ecd777dc0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.html
@@ -17,23 +17,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 50, 50, [0]);
-ctx.roundRect(100, 50, -50, -50, [0]);
-ctx.roundRect(0, 25, 100, -25, [0]);
-ctx.roundRect(100, 25, -100, 25, [0]);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 50, 50, [0]);
+ ctx.roundRect(100, 50, -50, -50, [0]);
+ ctx.roundRect(0, 25, 100, -25, [0]);
+ ctx.roundRect(100, 25, -100, 25, [0]);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js
index 82e6b5c3135..737e99f3731 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.winding.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.fillStyle = '#f00';
-ctx.roundRect(0, 0, 50, 50, [0]);
-ctx.roundRect(100, 50, -50, -50, [0]);
-ctx.roundRect(0, 25, 100, -25, [0]);
-ctx.roundRect(100, 25, -100, 25, [0]);
-ctx.fill();
-_assertPixel(canvas, 25,12, 0,255,0,255);
-_assertPixel(canvas, 75,12, 0,255,0,255);
-_assertPixel(canvas, 25,37, 0,255,0,255);
-_assertPixel(canvas, 75,37, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.fillStyle = '#f00';
+ ctx.roundRect(0, 0, 50, 50, [0]);
+ ctx.roundRect(100, 50, -50, -50, [0]);
+ ctx.roundRect(0, 25, 100, -25, [0]);
+ ctx.roundRect(100, 25, -100, 25, [0]);
+ ctx.fill();
+ _assertPixel(canvas, 25,12, 0,255,0,255);
+ _assertPixel(canvas, 75,12, 0,255,0,255);
+ _assertPixel(canvas, 25,37, 0,255,0,255);
+ _assertPixel(canvas, 75,37, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html
index 252475194ee..772339dcc69 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(0, 50, 100, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(0, 50, 100, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js
index 17c9be78ec6..afcaa207699 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.1.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(0, 50, 100, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(0, 50, 100, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html
index 2463e88f1eb..2aad5aad417 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, -100, 0, 250, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, -100, 0, 250, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js
index 9ae058a8476..dec178bd202 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.2.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, -100, 0, 250, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, -100, 0, 250, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html
index 39de433b081..485384aaff8 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js
index 98d37e08e53..88adb5c4373 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.3.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.beginPath();
-ctx.roundRect(50, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.beginPath();
+ ctx.roundRect(50, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html
index 3c6c734b19b..dfd4821a841 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js
index 462cde2a03e..fe8cc149c56 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.4.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 50;
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.lineTo(0, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 50;
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.lineTo(0, 25);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html
index de66603a66b..931a737e3bb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.html
@@ -17,18 +17,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js
index 0f706ce246f..1fd61246a98 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.5.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 0);
-ctx.roundRect(100, 25, 0, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 0);
+ ctx.roundRect(100, 25, 0, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html
index bd7ef0fa94c..25ed23d3293 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.html
@@ -17,20 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.roundRect(100, 25, 1000, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.roundRect(100, 25, 1000, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js
index f2115cdd461..c4b6fba5b0a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.roundrect.zero.6.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.5;
-ctx.lineWidth = 200;
-ctx.beginPath();
-ctx.roundRect(100, 25, 1000, 0, [0]);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.5;
+ ctx.lineWidth = 200;
+ ctx.beginPath();
+ ctx.roundRect(100, 25, 1000, 0, [0]);
+ ctx.stroke();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html
index a873b260da2..29a95da20d5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.html
@@ -17,21 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(40, 25);
-ctx.moveTo(60, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(40, 25);
+ ctx.moveTo(60, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js
index 1852c918768..56ee68f185b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.empty.worker.js
@@ -13,21 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(40, 25);
-ctx.moveTo(60, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(40, 25);
+ ctx.moveTo(60, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html
index 252a840ed75..c3847464bb7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.html
@@ -17,20 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 20);
-ctx.lineTo(100, 20);
-ctx.moveTo(0, 30);
-ctx.lineTo(100, 30);
-ctx.stroke();
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 20);
+ ctx.lineTo(100, 20);
+ ctx.moveTo(0, 30);
+ ctx.lineTo(100, 30);
+ ctx.stroke();
+
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png
new file mode 100644
index 00000000000..e2a35d48d4c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.png
Binary files differ
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js
index aa7cc51d774..0e59d3bfc0a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.overlap.worker.js
@@ -13,20 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
-ctx.lineWidth = 50;
-ctx.moveTo(0, 20);
-ctx.lineTo(100, 20);
-ctx.moveTo(0, 30);
-ctx.lineTo(100, 30);
-ctx.stroke();
-_assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
-t.done();
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
+ ctx.lineWidth = 50;
+ ctx.moveTo(0, 20);
+ ctx.lineTo(100, 20);
+ ctx.moveTo(0, 30);
+ ctx.lineTo(100, 30);
+ ctx.stroke();
+
+ _assertPixelApprox(canvas, 50,25, 0,127,0,255, 1);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html
index 67f25440dcd..40a73b85fbb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.html
@@ -17,25 +17,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 150, 25, 10);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(60, 25);
-ctx.arc(50, 25, 10, 0, 0, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 150, 25, 10);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(60, 25);
+ ctx.arc(50, 25, 10, 0, 0, false);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js
index ca5844ce2aa..880e8146ba5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.arc.worker.js
@@ -13,25 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.arcTo(50, 25, 150, 25, 10);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(60, 25);
-ctx.arc(50, 25, 10, 0, 0, false);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.arcTo(50, 25, 150, 25, 10);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(60, 25);
+ ctx.arc(50, 25, 10, 0, 0, false);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html
index 1012975fcf4..2a3b40068dd 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.html
@@ -17,22 +17,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.closePath();
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js
index 9b3426f6d0c..e1d271bf6aa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.closed.worker.js
@@ -13,22 +13,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.closePath();
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.closePath();
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html
index 553fdb61657..45db65d6d11 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.html
@@ -17,24 +17,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.4;
-ctx.beginPath();
-ctx.moveTo(-1000, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.4;
+
+ ctx.beginPath();
+ ctx.moveTo(-1000, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js
index c2233bbc15b..fff4ba19e98 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.corner.worker.js
@@ -13,24 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 400;
-ctx.lineJoin = 'miter';
-ctx.miterLimit = 1.4;
-ctx.beginPath();
-ctx.moveTo(-1000, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 200);
-ctx.lineTo(-100, 1000);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 400;
+ ctx.lineJoin = 'miter';
+ ctx.miterLimit = 1.4;
+
+ ctx.beginPath();
+ ctx.moveTo(-1000, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 200);
+ ctx.lineTo(-100, 1000);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html
index ae2f922a41b..946395f1c17 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.html
@@ -17,25 +17,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.quadraticCurveTo(50, 25, 50, 25);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.quadraticCurveTo(50, 25, 50, 25);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js
index 7dc88a72134..ed960fdbe7f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.curve.worker.js
@@ -13,25 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.quadraticCurveTo(50, 25, 50, 25);
-ctx.stroke();
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.quadraticCurveTo(50, 25, 50, 25);
+ ctx.stroke();
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html
index e9163cab40d..1f0a892455c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.html
@@ -17,21 +17,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js
index 160bbe7eea3..a00e73bcbbe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.line.worker.js
@@ -13,21 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.moveTo(50, 25);
-ctx.lineTo(50, 25);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.moveTo(50, 25);
+ ctx.lineTo(50, 25);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html
index 72d0d6b6e98..ffce538d919 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.html
@@ -17,21 +17,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
+
+ ctx.strokeRect(50, 25, 0, 0);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js
index c6ed67ed9e4..87bb533ff9e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.prune.rect.worker.js
@@ -13,21 +13,24 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 100;
-ctx.lineCap = 'round';
-ctx.lineJoin = 'round';
-ctx.beginPath();
-ctx.rect(50, 25, 0, 0);
-ctx.stroke();
-ctx.strokeRect(50, 25, 0, 0);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 100;
+ ctx.lineCap = 'round';
+ ctx.lineJoin = 'round';
+
+ ctx.beginPath();
+ ctx.rect(50, 25, 0, 0);
+ ctx.stroke();
+
+ ctx.strokeRect(50, 25, 0, 0);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html
index e13fd9fe550..47639065d33 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.html
@@ -17,35 +17,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js
index ef7b2d4d04e..3725fdf6e87 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale1.worker.js
@@ -13,35 +13,37 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.scale(50, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.scale(50, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html
index 2b80f16898e..447a6dfadc4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.html
@@ -17,37 +17,40 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js
index 9c6d4fbf54a..5223de78166 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.scale2.worker.js
@@ -13,37 +13,39 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.beginPath();
-ctx.rect(25, 12.5, 50, 25);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.beginPath();
-ctx.rect(-25, -12.5, 150, 75);
-ctx.save();
-ctx.rotate(Math.PI/2);
-ctx.scale(25, 50);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.beginPath();
+ ctx.rect(25, 12.5, 50, 25);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.beginPath();
+ ctx.rect(-25, -12.5, 150, 75);
+ ctx.save();
+ ctx.rotate(Math.PI/2);
+ ctx.scale(25, 50);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html
index 55e96e08e06..1fb118b1226 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.html
@@ -17,50 +17,54 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.save();
-ctx.beginPath();
-ctx.moveTo(49, -50);
-ctx.lineTo(201, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 283);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.moveTo(49, -50);
+ ctx.lineTo(201, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 283);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js
index 745afe4ff53..e65b796d068 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.skew.worker.js
@@ -13,50 +13,53 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.save();
-ctx.beginPath();
-ctx.moveTo(49, -50);
-ctx.lineTo(201, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 283);
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-ctx.save();
-ctx.beginPath();
-ctx.translate(-150, 0);
-ctx.moveTo(49, -50);
-ctx.lineTo(199, -50);
-ctx.rotate(Math.PI/4);
-ctx.scale(1, 142);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.restore();
-_assertPixel(canvas, 0,0, 0,255,0,255);
-_assertPixel(canvas, 50,0, 0,255,0,255);
-_assertPixel(canvas, 99,0, 0,255,0,255);
-_assertPixel(canvas, 0,25, 0,255,0,255);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 99,25, 0,255,0,255);
-_assertPixel(canvas, 0,49, 0,255,0,255);
-_assertPixel(canvas, 50,49, 0,255,0,255);
-_assertPixel(canvas, 99,49, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.moveTo(49, -50);
+ ctx.lineTo(201, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 283);
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ ctx.save();
+ ctx.beginPath();
+ ctx.translate(-150, 0);
+ ctx.moveTo(49, -50);
+ ctx.lineTo(199, -50);
+ ctx.rotate(Math.PI/4);
+ ctx.scale(1, 142);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+ ctx.restore();
+
+ _assertPixel(canvas, 0,0, 0,255,0,255);
+ _assertPixel(canvas, 50,0, 0,255,0,255);
+ _assertPixel(canvas, 99,0, 0,255,0,255);
+ _assertPixel(canvas, 0,25, 0,255,0,255);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 99,25, 0,255,0,255);
+ _assertPixel(canvas, 0,49, 0,255,0,255);
+ _assertPixel(canvas, 50,49, 0,255,0,255);
+ _assertPixel(canvas, 99,49, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html
index 58e7f75dc8e..3fc9cfad883 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.html
@@ -17,23 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.closePath();
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+
+ ctx.closePath();
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js
index a47c32d0099..d9df1ada943 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.unaffected.worker.js
@@ -13,23 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.lineWidth = 50;
-ctx.moveTo(-100, 25);
-ctx.lineTo(-100, -100);
-ctx.lineTo(200, -100);
-ctx.lineTo(200, 25);
-ctx.strokeStyle = '#f00';
-ctx.stroke();
-ctx.closePath();
-ctx.strokeStyle = '#0f0';
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.lineWidth = 50;
+ ctx.moveTo(-100, 25);
+ ctx.lineTo(-100, -100);
+ ctx.lineTo(200, -100);
+ ctx.lineTo(200, 25);
+ ctx.strokeStyle = '#f00';
+ ctx.stroke();
+
+ ctx.closePath();
+ ctx.strokeStyle = '#0f0';
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html
index c3f063fe52d..6b980acff2d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.html
@@ -17,20 +17,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 40;
-ctx.moveTo(0, 10);
-ctx.lineTo(100, 10);
-ctx.moveTo(100, 40);
-ctx.lineTo(0, 40);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 40;
+ ctx.moveTo(0, 10);
+ ctx.lineTo(100, 10);
+ ctx.moveTo(100, 40);
+ ctx.lineTo(0, 40);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js
index 282cb10bf75..3b05feec039 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.stroke.union.worker.js
@@ -13,20 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.strokeStyle = '#0f0';
-ctx.lineWidth = 40;
-ctx.moveTo(0, 10);
-ctx.lineTo(100, 10);
-ctx.moveTo(100, 40);
-ctx.lineTo(0, 40);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.strokeStyle = '#0f0';
+ ctx.lineWidth = 40;
+ ctx.moveTo(0, 10);
+ ctx.lineTo(100, 10);
+ ctx.moveTo(100, 40);
+ ctx.lineTo(0, 40);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html
index 18370041384..27f00aae037 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.html
@@ -17,18 +17,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.translate(-100, 0);
-ctx.rect(100, 0, 100, 50);
-ctx.translate(0, -100);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(-100, 0);
+ ctx.rect(100, 0, 100, 50);
+ ctx.translate(0, -100);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js
index 7bc112dd1d0..3ae4c876d5b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.basic.worker.js
@@ -13,18 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.translate(-100, 0);
-ctx.rect(100, 0, 100, 50);
-ctx.translate(0, -100);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(-100, 0);
+ ctx.rect(100, 0, 100, 50);
+ ctx.translate(0, -100);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html
index b8a467387d5..786a5cf5891 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.html
@@ -17,25 +17,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.translate(100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(0, 50);
-ctx.lineTo(0, 0);
-ctx.translate(-100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(1000, 1000);
-ctx.rotate(Math.PI/2);
-ctx.scale(0.1, 0.1);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.translate(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.translate(-100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(1000, 1000);
+ ctx.rotate(Math.PI/2);
+ ctx.scale(0.1, 0.1);
+ ctx.fill();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js
index 2460d24b199..2d8993c685c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.changing.worker.js
@@ -13,25 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.moveTo(0, 0);
-ctx.translate(100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(0, 50);
-ctx.lineTo(0, 0);
-ctx.translate(-100, 0);
-ctx.lineTo(0, 0);
-ctx.translate(1000, 1000);
-ctx.rotate(Math.PI/2);
-ctx.scale(0.1, 0.1);
-ctx.fill();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.moveTo(0, 0);
+ ctx.translate(100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(0, 50);
+ ctx.lineTo(0, 0);
+ ctx.translate(-100, 0);
+ ctx.lineTo(0, 0);
+ ctx.translate(1000, 1000);
+ ctx.rotate(Math.PI/2);
+ ctx.scale(0.1, 0.1);
+ ctx.fill();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html
index fcc2942435f..636491bb0ee 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.html
@@ -17,28 +17,31 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.translate(-100, 0);
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-ctx.translate(100, 0);
-ctx.fill();
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.translate(0, -50);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-ctx.translate(0, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.fillStyle = '#f00';
+ ctx.translate(-100, 0);
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ ctx.translate(100, 0);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.translate(0, -50);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ ctx.translate(0, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js
index a2a04ca7776..a9fb37d0de1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/path-objects/2d.path.transformation.multiple.worker.js
@@ -13,28 +13,30 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.translate(-100, 0);
-ctx.rect(0, 0, 100, 50);
-ctx.fill();
-ctx.translate(100, 0);
-ctx.fill();
-ctx.beginPath();
-ctx.strokeStyle = '#f00';
-ctx.lineWidth = 50;
-ctx.translate(0, -50);
-ctx.moveTo(0, 25);
-ctx.lineTo(100, 25);
-ctx.stroke();
-ctx.translate(0, 50);
-ctx.stroke();
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.translate(-100, 0);
+ ctx.rect(0, 0, 100, 50);
+ ctx.fill();
+ ctx.translate(100, 0);
+ ctx.fill();
+
+ ctx.beginPath();
+ ctx.strokeStyle = '#f00';
+ ctx.lineWidth = 50;
+ ctx.translate(0, -50);
+ ctx.moveTo(0, 25);
+ ctx.lineTo(100, 25);
+ ctx.stroke();
+ ctx.translate(0, 50);
+ ctx.stroke();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html
index 1f21ce6e32b..f6932386dfb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
-})(canvas, ctx);
-t.done();
+ _assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js
index 54d2cadb1c9..30f3ed21b19 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.basic.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertDifferent(ctx.createImageData(ctx.createImageData(1, 1)), null, "ctx.createImageData(ctx.createImageData(1, 1))", "null");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html
index 6e9e02c77d0..627b09b8bd2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(0, 0, 10, 20);
-var imgdata2 = ctx.createImageData(imgdata1);
-_assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
-_assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
-_assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata2.data.length; ++i)
- if (imgdata2.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata1 = ctx.getImageData(0, 0, 10, 20);
+ var imgdata2 = ctx.createImageData(imgdata1);
+ _assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
+ _assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
+ _assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata2.data.length; ++i)
+ if (imgdata2.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js
index bfff76b29fd..da0856a487c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.initial.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(0, 0, 10, 20);
-var imgdata2 = ctx.createImageData(imgdata1);
-_assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
-_assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
-_assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata2.data.length; ++i)
- if (imgdata2.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata1 = ctx.getImageData(0, 0, 10, 20);
+ var imgdata2 = ctx.createImageData(imgdata1);
+ _assertSame(imgdata2.data.length, imgdata1.data.length, "imgdata2.data.length", "imgdata1.data.length");
+ _assertSame(imgdata2.width, imgdata1.width, "imgdata2.width", "imgdata1.width");
+ _assertSame(imgdata2.height, imgdata1.height, "imgdata2.height", "imgdata1.height");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata2.data.length; ++i)
+ if (imgdata2.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html
index a4d074043f3..b5a95172b61 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.createImageData(null); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.createImageData(null); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js
index c51067ed620..1eabd9ebf31 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create1.zero.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.createImageData(null); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.createImageData(null); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html
index 4e99cac955f..7c265f5209d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
-})(canvas, ctx);
-t.done();
+ _assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js
index e99cbe276bc..26ca82929cb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.basic.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertDifferent(ctx.createImageData(1, 1), null, "ctx.createImageData(1, 1)", "null");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html
index d927f28854d..ca54641a30e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.createImageData(-10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-})(canvas, ctx);
-t.done();
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.createImageData(-10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js
index 773204cd418..2f3416d0f0e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.double.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.createImageData(-10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.createImageData(-10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html
index 10029344246..566a9a30db2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.createImageData(10, 20);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; ++i)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.createImageData(10, 20);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; ++i)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js
index 0e681dee076..472e1dfd2e3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.initial.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.createImageData(10, 20);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; ++i)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.createImageData(10, 20);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; ++i)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html
index e18893e9086..75b8f737fd9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.createImageData(1000, 2000);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.createImageData(1000, 2000);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js
index 57dda69d4d0..e2b85bfb692 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.large.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.createImageData(1000, 2000);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-_assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
-_assert(imgdata.width > 0, "imgdata.width > 0");
-var isTransparentBlack = true;
-for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
- if (imgdata.data[i] !== 0)
- isTransparentBlack = false;
-_assert(isTransparentBlack, "isTransparentBlack");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.createImageData(1000, 2000);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ _assert(imgdata.width < imgdata.height, "imgdata.width < imgdata.height");
+ _assert(imgdata.width > 0, "imgdata.width > 0");
+ var isTransparentBlack = true;
+ for (var i = 0; i < imgdata.data.length; i += 7813) // check ~1024 points (assuming normal scaling)
+ if (imgdata.data[i] !== 0)
+ isTransparentBlack = false;
+ _assert(isTransparentBlack, "isTransparentBlack");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html
index 9272c9ed9c1..b41153c2824 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10, 20);
-var imgdata2 = ctx.createImageData(-10, 20);
-var imgdata3 = ctx.createImageData(10, -20);
-var imgdata4 = ctx.createImageData(-10, -20);
-_assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
-_assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
-_assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
-})(canvas, ctx);
-t.done();
+ var imgdata1 = ctx.createImageData(10, 20);
+ var imgdata2 = ctx.createImageData(-10, 20);
+ var imgdata3 = ctx.createImageData(10, -20);
+ var imgdata4 = ctx.createImageData(-10, -20);
+ _assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
+ _assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
+ _assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js
index a5cb8572955..62ed60e1029 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.negative.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata1 = ctx.createImageData(10, 20);
-var imgdata2 = ctx.createImageData(-10, 20);
-var imgdata3 = ctx.createImageData(10, -20);
-var imgdata4 = ctx.createImageData(-10, -20);
-_assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
-_assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
-_assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata1 = ctx.createImageData(10, 20);
+ var imgdata2 = ctx.createImageData(-10, 20);
+ var imgdata3 = ctx.createImageData(10, -20);
+ var imgdata4 = ctx.createImageData(-10, -20);
+ _assertSame(imgdata1.data.length, imgdata2.data.length, "imgdata1.data.length", "imgdata2.data.length");
+ _assertSame(imgdata2.data.length, imgdata3.data.length, "imgdata2.data.length", "imgdata3.data.length");
+ _assertSame(imgdata3.data.length, imgdata4.data.length, "imgdata3.data.length", "imgdata4.data.length");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html
index f51dd744210..dd6f6d83501 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.html
@@ -15,31 +15,29 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js
index ace0f64f94e..18825588bbc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.nonfinite.worker.js
@@ -13,27 +13,26 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
-assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(-Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.createImageData(posinfobj, posinfobj); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html
index 046a04dbcca..0ecb2fb686a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
-_assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
-_assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
-})(canvas, ctx);
-t.done();
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
+ _assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
+ _assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js
index 23874984188..b416a02bf23 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.round.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata1 = ctx.createImageData(10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
-_assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
-_assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata1 = ctx.createImageData(10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, 10.01, 10.99);
+ _assertSame(imgdata1.width, imgdata2.width, "imgdata1.width", "imgdata2.width");
+ _assertSame(imgdata1.height, imgdata2.height, "imgdata1.height", "imgdata2.height");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html
index f109c7dc03f..2f7082a7f06 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
-})(canvas, ctx);
-t.done();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js
index 061e4ca1366..7f57c338988 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.create2.zero.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(0.99, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.createImageData(10, 0.1); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html
index e9cc7e98018..d810e64e38b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-_assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
-})(canvas, ctx);
-t.done();
+ _assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js
index 8accaccc752..f28268be17e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.basic.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-_assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ _assertDifferent(ctx.getImageData(0, 0, 100, 50), null, "ctx.getImageData(0, 0, 100, 50)", "null");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html
index f832c51c550..825d00a5c4c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = 'rgb(-100, -200, -300)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgb(256, 300, 400)';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = 'rgb(-100, -200, -300)';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = 'rgb(256, 300, 400)';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js
index ceeb8d5d868..fb4e76584a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.clamp.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = 'rgb(-100, -200, -300)';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = 'rgb(256, 300, 400)';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = 'rgb(-100, -200, -300)';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = 'rgb(256, 300, 400)';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata2.data[1], 255, "imgdata2.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata2.data[2], 255, "imgdata2.data[\""+(2)+"\"]", "255");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html
index 6839632de70..64fc7c7c12b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.html
@@ -15,20 +15,18 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-})(canvas, ctx);
-t.done();
+ var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js
index e05fe1009cb..316dce7f807 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.double.worker.js
@@ -13,16 +13,15 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
-var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
-_assertSame(imgdata1.width, 10, "imgdata1.width", "10");
-_assertSame(imgdata1.height, 10, "imgdata1.height", "10");
-_assertSame(imgdata2.width, 10, "imgdata2.width", "10");
-_assertSame(imgdata2.height, 10, "imgdata2.height", "10");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata1 = ctx.getImageData(0, 0, 10.01, 10.99);
+ var imgdata2 = ctx.getImageData(0, 0, -10.01, -10.99);
+ _assertSame(imgdata1.width, 10, "imgdata1.width", "10");
+ _assertSame(imgdata1.height, 10, "imgdata1.height", "10");
+ _assertSame(imgdata2.width, 10, "imgdata2.width", "10");
+ _assertSame(imgdata2.height, 10, "imgdata2.height", "10");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html
index df63bd2e2a5..dfc5d106ee1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.html
@@ -15,33 +15,31 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-imageData = ctx.getImageData(0,0,2,2);
-var testValues = [NaN, true, false, "\"garbage\"", "-1",
- "0", "1", "2", Infinity, -Infinity,
- -5, -0.5, 0, 0.5, 5,
- 5.4, 255, 256, null, undefined];
-var testResults = [0, 1, 0, 0, 0,
- 0, 1, 2, 255, 0,
- 0, 0, 0, 0, 5,
- 5, 255, 255, 0, 0];
-for (var i = 0; i < testValues.length; i++) {
- imageData.data[0] = testValues[i];
- _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
-}
-imageData.data['foo']='garbage';
-_assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
-imageData.data[-1]='garbage';
-_assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
-imageData.data[17]='garbage';
-_assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
-})(canvas, ctx);
-t.done();
+ imageData = ctx.getImageData(0,0,2,2);
+ var testValues = [NaN, true, false, "\"garbage\"", "-1",
+ "0", "1", "2", Infinity, -Infinity,
+ -5, -0.5, 0, 0.5, 5,
+ 5.4, 255, 256, null, undefined];
+ var testResults = [0, 1, 0, 0, 0,
+ 0, 1, 2, 255, 0,
+ 0, 0, 0, 0, 5,
+ 5, 255, 255, 0, 0];
+ for (var i = 0; i < testValues.length; i++) {
+ imageData.data[0] = testValues[i];
+ _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
+ }
+ imageData.data['foo']='garbage';
+ _assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
+ imageData.data[-1]='garbage';
+ _assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
+ imageData.data[17]='garbage';
+ _assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js
index c9798f59f63..5206899b6ae 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.invalid.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-imageData = ctx.getImageData(0,0,2,2);
-var testValues = [NaN, true, false, "\"garbage\"", "-1",
- "0", "1", "2", Infinity, -Infinity,
- -5, -0.5, 0, 0.5, 5,
- 5.4, 255, 256, null, undefined];
-var testResults = [0, 1, 0, 0, 0,
- 0, 1, 2, 255, 0,
- 0, 0, 0, 0, 5,
- 5, 255, 255, 0, 0];
-for (var i = 0; i < testValues.length; i++) {
- imageData.data[0] = testValues[i];
- _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
-}
-imageData.data['foo']='garbage';
-_assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
-imageData.data[-1]='garbage';
-_assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
-imageData.data[17]='garbage';
-_assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ imageData = ctx.getImageData(0,0,2,2);
+ var testValues = [NaN, true, false, "\"garbage\"", "-1",
+ "0", "1", "2", Infinity, -Infinity,
+ -5, -0.5, 0, 0.5, 5,
+ 5.4, 255, 256, null, undefined];
+ var testResults = [0, 1, 0, 0, 0,
+ 0, 1, 2, 255, 0,
+ 0, 0, 0, 0, 5,
+ 5, 255, 255, 0, 0];
+ for (var i = 0; i < testValues.length; i++) {
+ imageData.data[0] = testValues[i];
+ _assert(imageData.data[0] == testResults[i], "imageData.data[\""+(0)+"\"] == testResults[\""+(i)+"\"]");
+ }
+ imageData.data['foo']='garbage';
+ _assert(imageData.data['foo'] == 'garbage', "imageData.data['foo'] == 'garbage'");
+ imageData.data[-1]='garbage';
+ _assert(imageData.data[-1] == undefined, "imageData.data[-1] == undefined");
+ imageData.data[17]='garbage';
+ _assert(imageData.data[17] == undefined, "imageData.data[\""+(17)+"\"] == undefined");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html
index 5e6102d67d0..3e05c3c92b9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js
index 142c0b833d0..62c1771dbab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.large.crash.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 0xffffffff, 2147483647, 10); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html
index 19fbac06535..47b5fcd166f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.html
@@ -15,16 +15,14 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js
index dd2e3dd6c5f..74ed6015f08 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.length.worker.js
@@ -13,12 +13,11 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data.length, imgdata.width*imgdata.height*4, "imgdata.data.length", "imgdata.width*imgdata.height*4");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html
index b9324865b6b..62cad618483 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.html
@@ -15,63 +15,61 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js
index da70d1b2138..98b4913a132 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonfinite.worker.js
@@ -13,59 +13,58 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
-var posinfobj = { valueOf: function() { return Infinity; } },
- neginfobj = { valueOf: function() { return -Infinity; } },
- nanobj = { valueOf: function() { return -Infinity; } };
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
-assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(-Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, Infinity, Infinity); });
+ var posinfobj = { valueOf: function() { return Infinity; } },
+ neginfobj = { valueOf: function() { return -Infinity; } },
+ nanobj = { valueOf: function() { return -Infinity; } };
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(neginfobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(nanobj, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, neginfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, nanobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, neginfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, nanobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, neginfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, 10, nanobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(posinfobj, 10, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, 10); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, posinfobj, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, posinfobj, 10, posinfobj); });
+ assert_throws_js(TypeError, function() { ctx.getImageData(10, 10, posinfobj, posinfobj); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html
index 89eea879318..3a97d9dc05b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(10, 10, 10, 10);
-_assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
-_assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
-_assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(10, 10, 10, 10);
+ _assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
+ _assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
+ _assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js
index d568c31b38d..1a8da5efb0a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.nonpremul.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(10, 10, 10, 10);
-_assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
-_assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
-_assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = 'rgba(255, 255, 255, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(10, 10, 10, 10);
+ _assert(imgdata.data[0] > 200, "imgdata.data[\""+(0)+"\"] > 200");
+ _assert(imgdata.data[1] > 200, "imgdata.data[\""+(1)+"\"] > 200");
+ _assert(imgdata.data[2] > 200, "imgdata.data[\""+(2)+"\"] > 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html
index f79f5f351e0..04eb67902fa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js
index 038844816f3..4338436a6df 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.alpha.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
-_assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = 'rgba(0, 0, 0, 0.5)';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assert(imgdata.data[3] < 200, "imgdata.data[\""+(3)+"\"] < 200");
+ _assert(imgdata.data[3] > 100, "imgdata.data[\""+(3)+"\"] > 100");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html
index 9afceba7023..f5b315c60a3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 2, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
-_assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 2, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
+ _assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js
index 6a13c4dee65..6a070e25169 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.cols.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 2, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
-_assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 2, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.round(imgdata.width/2*4)], 255, "imgdata.data[Math.round(imgdata.width/2*4)]", "255");
+ _assertSame(imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)], 0, "imgdata.data[Math.round((imgdata.height/2)*imgdata.width*4)]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html
index 0fd4759409e..661b437fb1b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#48c';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
-_assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
-_assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
-_assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
-_assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
-_assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
-_assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#48c';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
+ _assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
+ _assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
+ _assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
+ _assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
+ _assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
+ _assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js
index 771a777b9bd..4e5974f9f86 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rgb.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#48c';
-ctx.fillRect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
-_assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
-_assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
-_assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
-_assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
-_assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
-_assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#48c';
+ ctx.fillRect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0x44, "imgdata.data[\""+(0)+"\"]", "0x44");
+ _assertSame(imgdata.data[1], 0x88, "imgdata.data[\""+(1)+"\"]", "0x88");
+ _assertSame(imgdata.data[2], 0xCC, "imgdata.data[\""+(2)+"\"]", "0xCC");
+ _assertSame(imgdata.data[3], 255, "imgdata.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata.data[4], 0x44, "imgdata.data[\""+(4)+"\"]", "0x44");
+ _assertSame(imgdata.data[5], 0x88, "imgdata.data[\""+(5)+"\"]", "0x88");
+ _assertSame(imgdata.data[6], 0xCC, "imgdata.data[\""+(6)+"\"]", "0xCC");
+ _assertSame(imgdata.data[7], 255, "imgdata.data[\""+(7)+"\"]", "255");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html
index eb7a137ab19..6d8ee2eba5e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 2);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
-_assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 2);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
+ _assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js
index 1f75f9301c9..1d3226a5033 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.order.rows.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#fff';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 2);
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
-_assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 2);
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[Math.floor(imgdata.width/2*4)], 0, "imgdata.data[Math.floor(imgdata.width/2*4)]", "0");
+ _assertSame(imgdata.data[(imgdata.height/2)*imgdata.width*4], 255, "imgdata.data[(imgdata.height/2)*imgdata.width*4]", "255");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html
index 91c0c5844a5..8db1a42ca11 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js
index 9389c22bd31..2e962beeaed 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.range.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-var imgdata2 = ctx.getImageData(30, 15, 1, 1);
-_assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
+ var imgdata1 = ctx.getImageData(10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(30, 15, 1, 1);
+ _assertSame(imgdata2.data[0], 255, "imgdata2.data[\""+(0)+"\"]", "255");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html
index a06d180a575..f939ba82dfa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.html
@@ -15,33 +15,31 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-function testDimensions(sx, sy, sw, sh, width, height)
-{
- imageData = ctx.getImageData(sx, sy, sw, sh);
- _assert(imageData.width == width, "imageData.width == width");
- _assert(imageData.height == height, "imageData.height == height");
-}
+ function testDimensions(sx, sy, sw, sh, width, height)
+ {
+ imageData = ctx.getImageData(sx, sy, sw, sh);
+ _assert(imageData.width == width, "imageData.width == width");
+ _assert(imageData.height == height, "imageData.height == height");
+ }
-testDimensions(0, 0, 20, 10, 20, 10);
+ testDimensions(0, 0, 20, 10, 20, 10);
-testDimensions(.1, .2, 20, 10, 20, 10);
-testDimensions(.9, .8, 20, 10, 20, 10);
+ testDimensions(.1, .2, 20, 10, 20, 10);
+ testDimensions(.9, .8, 20, 10, 20, 10);
-testDimensions(0, 0, 20.9, 10.9, 20, 10);
-testDimensions(0, 0, 20.1, 10.1, 20, 10);
+ testDimensions(0, 0, 20.9, 10.9, 20, 10);
+ testDimensions(0, 0, 20.1, 10.1, 20, 10);
-testDimensions(-1, -1, 20, 10, 20, 10);
+ testDimensions(-1, -1, 20, 10, 20, 10);
-testDimensions(-1.1, 0, 20, 10, 20, 10);
-testDimensions(-1.9, 0, 20, 10, 20, 10);
-})(canvas, ctx);
-t.done();
+ testDimensions(-1.1, 0, 20, 10, 20, 10);
+ testDimensions(-1.9, 0, 20, 10, 20, 10);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js
index 8cdbf790f9d..b2cd08ade2c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.rounding.worker.js
@@ -13,29 +13,28 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-function testDimensions(sx, sy, sw, sh, width, height)
-{
- imageData = ctx.getImageData(sx, sy, sw, sh);
- _assert(imageData.width == width, "imageData.width == width");
- _assert(imageData.height == height, "imageData.height == height");
-}
+ function testDimensions(sx, sy, sw, sh, width, height)
+ {
+ imageData = ctx.getImageData(sx, sy, sw, sh);
+ _assert(imageData.width == width, "imageData.width == width");
+ _assert(imageData.height == height, "imageData.height == height");
+ }
-testDimensions(0, 0, 20, 10, 20, 10);
+ testDimensions(0, 0, 20, 10, 20, 10);
-testDimensions(.1, .2, 20, 10, 20, 10);
-testDimensions(.9, .8, 20, 10, 20, 10);
+ testDimensions(.1, .2, 20, 10, 20, 10);
+ testDimensions(.9, .8, 20, 10, 20, 10);
-testDimensions(0, 0, 20.9, 10.9, 20, 10);
-testDimensions(0, 0, 20.1, 10.1, 20, 10);
+ testDimensions(0, 0, 20.9, 10.9, 20, 10);
+ testDimensions(0, 0, 20.1, 10.1, 20, 10);
-testDimensions(-1, -1, 20, 10, 20, 10);
-
-testDimensions(-1.1, 0, 20, 10, 20, 10);
-testDimensions(-1.9, 0, 20, 10, 20, 10);
-t.done();
+ testDimensions(-1, -1, 20, 10, 20, 10);
+ testDimensions(-1.1, 0, 20, 10, 20, 10);
+ testDimensions(-1.9, 0, 20, 10, 20, 10);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html
index 7e9d36338d7..a4b9c7e41c7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.html
@@ -15,34 +15,32 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
-
-var imgdata1 = ctx.getImageData(85, 25, -10, -10);
-_assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
-
-var imgdata2 = ctx.getImageData(0, 0, -1, -1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
+
+ var imgdata1 = ctx.getImageData(85, 25, -10, -10);
+ _assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
+
+ var imgdata2 = ctx.getImageData(0, 0, -1, -1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js
index 989178792a0..62929918ec4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.negative.worker.js
@@ -13,30 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#000';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#fff';
-ctx.fillRect(20, 10, 60, 10);
+ ctx.fillStyle = '#000';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#fff';
+ ctx.fillRect(20, 10, 60, 10);
-var imgdata1 = ctx.getImageData(85, 25, -10, -10);
-_assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
-_assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
-_assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
-_assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
-_assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
-
-var imgdata2 = ctx.getImageData(0, 0, -1, -1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-t.done();
+ var imgdata1 = ctx.getImageData(85, 25, -10, -10);
+ _assertSame(imgdata1.data[0], 255, "imgdata1.data[\""+(0)+"\"]", "255");
+ _assertSame(imgdata1.data[1], 255, "imgdata1.data[\""+(1)+"\"]", "255");
+ _assertSame(imgdata1.data[2], 255, "imgdata1.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata1.data[3], 255, "imgdata1.data[\""+(3)+"\"]", "255");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+0], 0, "imgdata1.data[imgdata1.data.length-4+0]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+1], 0, "imgdata1.data[imgdata1.data.length-4+1]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+2], 0, "imgdata1.data[imgdata1.data.length-4+2]", "0");
+ _assertSame(imgdata1.data[imgdata1.data.length-4+3], 255, "imgdata1.data[imgdata1.data.length-4+3]", "255");
+ var imgdata2 = ctx.getImageData(0, 0, -1, -1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html
index 7dbe2dd1b34..ca11da80d50 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.html
@@ -15,74 +15,72 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#08f';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#08f';
+ ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
+ var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
-var imgdata2 = ctx.getImageData(10, -5, 1, 1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(10, -5, 1, 1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-var imgdata3 = ctx.getImageData(200, 5, 1, 1);
-_assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
+ var imgdata3 = ctx.getImageData(200, 5, 1, 1);
+ _assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
-var imgdata4 = ctx.getImageData(10, 60, 1, 1);
-_assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
+ var imgdata4 = ctx.getImageData(10, 60, 1, 1);
+ _assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
-var imgdata5 = ctx.getImageData(100, 10, 1, 1);
-_assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
+ var imgdata5 = ctx.getImageData(100, 10, 1, 1);
+ _assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
-var imgdata6 = ctx.getImageData(0, 10, 1, 1);
-_assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
-_assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
+ var imgdata6 = ctx.getImageData(0, 10, 1, 1);
+ _assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
+ _assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
-var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
-_assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
-_assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
-_assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
-_assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
-_assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
-_assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
-_assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
-_assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
-_assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
-_assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
-_assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
-_assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
-_assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
-_assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
-_assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
-_assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
-_assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
-_assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
-_assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
-_assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
-})(canvas, ctx);
-t.done();
+ var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
+ _assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
+ _assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
+ _assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
+ _assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
+ _assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
+ _assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
+ _assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
+ _assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
+ _assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
+ _assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
+ _assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
+ _assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
+ _assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
+ _assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
+ _assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
+ _assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
+ _assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
+ _assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
+ _assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
+ _assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js
index eb7f355d683..35fa83d6687 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.outside.worker.js
@@ -13,70 +13,69 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#08f';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#08f';
+ ctx.fillRect(0, 0, 100, 50);
-var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
-_assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
+ var imgdata1 = ctx.getImageData(-10, 5, 1, 1);
+ _assertSame(imgdata1.data[0], 0, "imgdata1.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata1.data[1], 0, "imgdata1.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata1.data[2], 0, "imgdata1.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata1.data[3], 0, "imgdata1.data[\""+(3)+"\"]", "0");
-var imgdata2 = ctx.getImageData(10, -5, 1, 1);
-_assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
+ var imgdata2 = ctx.getImageData(10, -5, 1, 1);
+ _assertSame(imgdata2.data[0], 0, "imgdata2.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata2.data[1], 0, "imgdata2.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata2.data[2], 0, "imgdata2.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata2.data[3], 0, "imgdata2.data[\""+(3)+"\"]", "0");
-var imgdata3 = ctx.getImageData(200, 5, 1, 1);
-_assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
+ var imgdata3 = ctx.getImageData(200, 5, 1, 1);
+ _assertSame(imgdata3.data[0], 0, "imgdata3.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata3.data[1], 0, "imgdata3.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata3.data[2], 0, "imgdata3.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata3.data[3], 0, "imgdata3.data[\""+(3)+"\"]", "0");
-var imgdata4 = ctx.getImageData(10, 60, 1, 1);
-_assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
+ var imgdata4 = ctx.getImageData(10, 60, 1, 1);
+ _assertSame(imgdata4.data[0], 0, "imgdata4.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata4.data[1], 0, "imgdata4.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata4.data[2], 0, "imgdata4.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata4.data[3], 0, "imgdata4.data[\""+(3)+"\"]", "0");
-var imgdata5 = ctx.getImageData(100, 10, 1, 1);
-_assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
+ var imgdata5 = ctx.getImageData(100, 10, 1, 1);
+ _assertSame(imgdata5.data[0], 0, "imgdata5.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata5.data[1], 0, "imgdata5.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata5.data[2], 0, "imgdata5.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata5.data[3], 0, "imgdata5.data[\""+(3)+"\"]", "0");
-var imgdata6 = ctx.getImageData(0, 10, 1, 1);
-_assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
-_assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
-_assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
-
-var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
-_assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
-_assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
-_assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
-_assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
-_assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
-_assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
-_assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
-_assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
-_assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
-_assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
-_assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
-_assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
-_assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
-_assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
-_assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
-_assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
-_assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
-_assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
-_assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
-_assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
-t.done();
+ var imgdata6 = ctx.getImageData(0, 10, 1, 1);
+ _assertSame(imgdata6.data[0], 0, "imgdata6.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata6.data[1], 136, "imgdata6.data[\""+(1)+"\"]", "136");
+ _assertSame(imgdata6.data[2], 255, "imgdata6.data[\""+(2)+"\"]", "255");
+ _assertSame(imgdata6.data[3], 255, "imgdata6.data[\""+(3)+"\"]", "255");
+ var imgdata7 = ctx.getImageData(-10, 10, 20, 20);
+ _assertSame(imgdata7.data[ 0*4+0], 0, "imgdata7.data[ 0*4+0]", "0");
+ _assertSame(imgdata7.data[ 0*4+1], 0, "imgdata7.data[ 0*4+1]", "0");
+ _assertSame(imgdata7.data[ 0*4+2], 0, "imgdata7.data[ 0*4+2]", "0");
+ _assertSame(imgdata7.data[ 0*4+3], 0, "imgdata7.data[ 0*4+3]", "0");
+ _assertSame(imgdata7.data[ 9*4+0], 0, "imgdata7.data[ 9*4+0]", "0");
+ _assertSame(imgdata7.data[ 9*4+1], 0, "imgdata7.data[ 9*4+1]", "0");
+ _assertSame(imgdata7.data[ 9*4+2], 0, "imgdata7.data[ 9*4+2]", "0");
+ _assertSame(imgdata7.data[ 9*4+3], 0, "imgdata7.data[ 9*4+3]", "0");
+ _assertSame(imgdata7.data[10*4+0], 0, "imgdata7.data[10*4+0]", "0");
+ _assertSame(imgdata7.data[10*4+1], 136, "imgdata7.data[10*4+1]", "136");
+ _assertSame(imgdata7.data[10*4+2], 255, "imgdata7.data[10*4+2]", "255");
+ _assertSame(imgdata7.data[10*4+3], 255, "imgdata7.data[10*4+3]", "255");
+ _assertSame(imgdata7.data[19*4+0], 0, "imgdata7.data[19*4+0]", "0");
+ _assertSame(imgdata7.data[19*4+1], 136, "imgdata7.data[19*4+1]", "136");
+ _assertSame(imgdata7.data[19*4+2], 255, "imgdata7.data[19*4+2]", "255");
+ _assertSame(imgdata7.data[19*4+3], 255, "imgdata7.data[19*4+3]", "255");
+ _assertSame(imgdata7.data[20*4+0], 0, "imgdata7.data[20*4+0]", "0");
+ _assertSame(imgdata7.data[20*4+1], 0, "imgdata7.data[20*4+1]", "0");
+ _assertSame(imgdata7.data[20*4+2], 0, "imgdata7.data[20*4+2]", "0");
+ _assertSame(imgdata7.data[20*4+3], 0, "imgdata7.data[20*4+3]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html
index 8a8a71d9884..6cb848a7187 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata1 = ctx.getImageData(0, 0, 10, 10);
-var imgdata2 = ctx.getImageData(0, 0, 20, 20);
-_assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
-_assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
-})(canvas, ctx);
-t.done();
+ var imgdata1 = ctx.getImageData(0, 0, 10, 10);
+ var imgdata2 = ctx.getImageData(0, 0, 20, 20);
+ _assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
+ _assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js
index 111f4b58696..e54d75b97a6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.source.size.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata1 = ctx.getImageData(0, 0, 10, 10);
-var imgdata2 = ctx.getImageData(0, 0, 20, 20);
-_assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
-_assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata1 = ctx.getImageData(0, 0, 10, 10);
+ var imgdata2 = ctx.getImageData(0, 0, 20, 20);
+ _assert(imgdata2.width > imgdata1.width, "imgdata2.width > imgdata1.width");
+ _assert(imgdata2.height > imgdata1.height, "imgdata2.height > imgdata1.height");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html
index c096cc5be31..66a0b80fd71 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.html
@@ -15,30 +15,28 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50)
-ctx.save();
-ctx.translate(50, 0);
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.rect(0, 0, 5, 5);
-ctx.clip();
-var imgdata = ctx.getImageData(0, 0, 50, 50);
-ctx.restore();
-ctx.putImageData(imgdata, 50, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50)
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.rect(0, 0, 5, 5);
+ ctx.clip();
+ var imgdata = ctx.getImageData(0, 0, 50, 50);
+ ctx.restore();
+ ctx.putImageData(imgdata, 50, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js
index a733c6ffdf7..8bf0dddb063 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.unaffected.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(50, 0, 50, 50)
-ctx.save();
-ctx.translate(50, 0);
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.rect(0, 0, 5, 5);
-ctx.clip();
-var imgdata = ctx.getImageData(0, 0, 50, 50);
-ctx.restore();
-ctx.putImageData(imgdata, 50, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(50, 0, 50, 50)
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.rect(0, 0, 5, 5);
+ ctx.clip();
+ var imgdata = ctx.getImageData(0, 0, 50, 50);
+ ctx.restore();
+ ctx.putImageData(imgdata, 50, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html
index 9bad2b78439..042a8bc5f54 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
-})(canvas, ctx);
-t.done();
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js
index 82f021ca8d4..ed31030d3cc 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.get.zero.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
-assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0, 0); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, 0.99); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, -0.1, 10); });
+ assert_throws_dom("INDEX_SIZE_ERR", function() { ctx.getImageData(1, 1, 10, -0.99); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html
index 1bd6224892c..aa6073eedf5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.html
@@ -15,43 +15,41 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 300;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -100;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 200+Math.pow(2, 32);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -200-Math.pow(2, 32);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = Math.pow(10, 39);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -Math.pow(10, 39);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = -Infinity;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = Infinity;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 300;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -100;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 200+Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -200-Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Infinity;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Infinity;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js
index 0914c8fdc75..260198fe2fe 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.clamp.worker.js
@@ -13,39 +13,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 300;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -100;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = 200+Math.pow(2, 32);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -200-Math.pow(2, 32);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = Math.pow(10, 39);
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = 100;
-imgdata.data[0] = -Math.pow(10, 39);
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-
-imgdata.data[0] = 100;
-imgdata.data[0] = -Infinity;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = Infinity;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 300;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -100;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = 200+Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -200-Math.pow(2, 32);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Math.pow(10, 39);
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+
+ imgdata.data[0] = 100;
+ imgdata.data[0] = -Infinity;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = Infinity;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html
index 9910af8e2af..af692a7f9f3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = NaN;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = "cheese";
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = NaN;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "cheese";
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js
index ef2eb21b371..4ebfedb1e83 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.nan.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = NaN;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 100;
-imgdata.data[0] = "cheese";
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = NaN;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "cheese";
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html
index 13dd3695328..68a6f638686 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
-_assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
-_assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
+ _assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
+ _assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js
index 42c89ef1179..e428e0d4fce 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.properties.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-_assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
-_assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
-_assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ _assertSame(typeof(imgdata.width), 'number', "typeof(imgdata.width)", "'number'");
+ _assertSame(typeof(imgdata.height), 'number', "typeof(imgdata.height)", "'number'");
+ _assertSame(typeof(imgdata.data), 'object', "typeof(imgdata.data)", "'object'");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html
index a141786fec8..2ab5f47f64e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.html
@@ -15,28 +15,26 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-var w = imgdata.width;
-var h = imgdata.height;
-var d = imgdata.data;
-imgdata.width = 123;
-imgdata.height = 123;
-imgdata.data = [100,100,100,100];
-_assertSame(imgdata.width, w, "imgdata.width", "w");
-_assertSame(imgdata.height, h, "imgdata.height", "h");
-_assertSame(imgdata.data, d, "imgdata.data", "d");
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ var w = imgdata.width;
+ var h = imgdata.height;
+ var d = imgdata.data;
+ imgdata.width = 123;
+ imgdata.height = 123;
+ imgdata.data = [100,100,100,100];
+ _assertSame(imgdata.width, w, "imgdata.width", "w");
+ _assertSame(imgdata.height, h, "imgdata.height", "h");
+ _assertSame(imgdata.data, d, "imgdata.data", "d");
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js
index 068761e2e64..d02f0f319aa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.readonly.worker.js
@@ -13,24 +13,23 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-var w = imgdata.width;
-var h = imgdata.height;
-var d = imgdata.data;
-imgdata.width = 123;
-imgdata.height = 123;
-imgdata.data = [100,100,100,100];
-_assertSame(imgdata.width, w, "imgdata.width", "w");
-_assertSame(imgdata.height, h, "imgdata.height", "h");
-_assertSame(imgdata.data, d, "imgdata.data", "d");
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-_assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
-_assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
-_assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ var w = imgdata.width;
+ var h = imgdata.height;
+ var d = imgdata.data;
+ imgdata.width = 123;
+ imgdata.height = 123;
+ imgdata.data = [100,100,100,100];
+ _assertSame(imgdata.width, w, "imgdata.width", "w");
+ _assertSame(imgdata.height, h, "imgdata.height", "h");
+ _assertSame(imgdata.data, d, "imgdata.data", "d");
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ _assertSame(imgdata.data[1], 0, "imgdata.data[\""+(1)+"\"]", "0");
+ _assertSame(imgdata.data[2], 0, "imgdata.data[\""+(2)+"\"]", "0");
+ _assertSame(imgdata.data[3], 0, "imgdata.data[\""+(3)+"\"]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html
index 306ccb8df44..fbde0cd940e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.html
@@ -15,43 +15,41 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 0.499;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.501;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.499;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 1.501;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 2.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 3.5;
-_assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
-imgdata.data[0] = 252.5;
-_assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
-imgdata.data[0] = 253.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 254.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 256.5;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = -0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = -1.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 0.499;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.501;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.499;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 1.501;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 2.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 3.5;
+ _assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
+ imgdata.data[0] = 252.5;
+ _assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
+ imgdata.data[0] = 253.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 254.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 256.5;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = -0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = -1.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js
index 4a88db9cdd0..8ef3c027932 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.round.worker.js
@@ -13,39 +13,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 0.499;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = 0.501;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.499;
-_assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
-imgdata.data[0] = 1.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 1.501;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 2.5;
-_assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
-imgdata.data[0] = 3.5;
-_assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
-imgdata.data[0] = 252.5;
-_assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
-imgdata.data[0] = 253.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 254.5;
-_assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
-imgdata.data[0] = 256.5;
-_assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
-imgdata.data[0] = -0.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-imgdata.data[0] = -1.5;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 0.499;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = 0.501;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.499;
+ _assertSame(imgdata.data[0], 1, "imgdata.data[\""+(0)+"\"]", "1");
+ imgdata.data[0] = 1.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 1.501;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 2.5;
+ _assertSame(imgdata.data[0], 2, "imgdata.data[\""+(0)+"\"]", "2");
+ imgdata.data[0] = 3.5;
+ _assertSame(imgdata.data[0], 4, "imgdata.data[\""+(0)+"\"]", "4");
+ imgdata.data[0] = 252.5;
+ _assertSame(imgdata.data[0], 252, "imgdata.data[\""+(0)+"\"]", "252");
+ imgdata.data[0] = 253.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 254.5;
+ _assertSame(imgdata.data[0], 254, "imgdata.data[\""+(0)+"\"]", "254");
+ imgdata.data[0] = 256.5;
+ _assertSame(imgdata.data[0], 255, "imgdata.data[\""+(0)+"\"]", "255");
+ imgdata.data[0] = -0.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ imgdata.data[0] = -1.5;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html
index a5808b77772..27ed5a35047 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.html
@@ -15,19 +15,17 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-_assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
-imgdata.data[0] = 200;
-_assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ _assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
+ imgdata.data[0] = 200;
+ _assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js
index fcb16ab577f..f9b755f7e26 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.set.worker.js
@@ -13,15 +13,14 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-_assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
-imgdata.data[0] = 200;
-_assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ _assertSame(imgdata.data[0], 100, "imgdata.data[\""+(0)+"\"]", "100");
+ imgdata.data[0] = 200;
+ _assertSame(imgdata.data[0], 200, "imgdata.data[\""+(0)+"\"]", "200");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html
index 5245f3a6757..a437c475a59 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.html
@@ -15,24 +15,22 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = "110";
-_assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
-imgdata.data[0] = 100;
-imgdata.data[0] = "0x78";
-_assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
-imgdata.data[0] = 100;
-imgdata.data[0] = " +130e0 ";
-_assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "110";
+ _assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "0x78";
+ _assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = " +130e0 ";
+ _assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js
index 6c2dcc8b42f..84cff6a48c1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.string.worker.js
@@ -13,20 +13,19 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = "110";
-_assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
-imgdata.data[0] = 100;
-imgdata.data[0] = "0x78";
-_assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
-imgdata.data[0] = 100;
-imgdata.data[0] = " +130e0 ";
-_assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "110";
+ _assertSame(imgdata.data[0], 110, "imgdata.data[\""+(0)+"\"]", "110");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = "0x78";
+ _assertSame(imgdata.data[0], 120, "imgdata.data[\""+(0)+"\"]", "120");
+ imgdata.data[0] = 100;
+ imgdata.data[0] = " +130e0 ";
+ _assertSame(imgdata.data[0], 130, "imgdata.data[\""+(0)+"\"]", "130");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html
index 3290c579bb3..81462339e9b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = undefined;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = undefined;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js
index f6b62993f6c..825f8c102f4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.object.undefined.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-imgdata.data[0] = 100;
-imgdata.data[0] = undefined;
-_assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ imgdata.data[0] = 100;
+ imgdata.data[0] = undefined;
+ _assertSame(imgdata.data[0], 0, "imgdata.data[\""+(0)+"\"]", "0");
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html
index 4e64e4207e2..dcd2d92ab13 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js
index 3349c692869..25d80471897 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.alpha.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = 'rgba(0, 255, 0, 0.25)';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,64, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html
index 76f143ad6ae..257e0330d52 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js
index 276fea2d126..6a68ffa792e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.basic.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html
index fef4c2c1a88..648ded588c2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js
index 9188b3cf88e..b665edbb336 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.clip.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.beginPath();
-ctx.rect(0, 0, 50, 50);
-ctx.clip();
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.beginPath();
+ ctx.rect(0, 0, 50, 50);
+ ctx.clip();
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 25,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 75,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html
index d936c02d418..08f35117ddb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.html
@@ -15,25 +15,23 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.createImageData(100, 50);
-for (var i = 0; i < imgdata.data.length; i += 4) {
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
- imgdata.data[i+2] = 0;
- imgdata.data[i+3] = 255;
-}
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.createImageData(100, 50);
+ for (var i = 0; i < imgdata.data.length; i += 4) {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ imgdata.data[i+2] = 0;
+ imgdata.data[i+3] = 255;
+ }
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js
index fd6b5ec8e09..f249efb4bb5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.created.worker.js
@@ -13,21 +13,20 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.createImageData(100, 50);
-for (var i = 0; i < imgdata.data.length; i += 4) {
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
- imgdata.data[i+2] = 0;
- imgdata.data[i+3] = 255;
-}
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.createImageData(100, 50);
+ for (var i = 0; i < imgdata.data.length; i += 4) {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ imgdata.data[i+2] = 0;
+ imgdata.data[i+3] = 255;
+ }
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html
index e00f9bd0db5..cddd0451a45 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50)
-var imgdata = ctx2.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50)
+ var imgdata = ctx2.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js
index bdeaa352457..0ec4ed142f7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.cross.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var offscreenCanvas2 = new OffscreenCanvas(100, 50);
-var ctx2 = offscreenCanvas2.getContext('2d');
-ctx2.fillStyle = '#0f0';
-ctx2.fillRect(0, 0, 100, 50)
-var imgdata = ctx2.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var offscreenCanvas2 = new OffscreenCanvas(100, 50);
+ var ctx2 = offscreenCanvas2.getContext('2d');
+ ctx2.fillStyle = '#0f0';
+ ctx2.fillRect(0, 0, 100, 50)
+ var imgdata = ctx2.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html
index 7493abc0cbb..cea4d0d4775 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js
index f228813f321..0a7af640492 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.negative.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 20, 20, -20, -20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html
index 3aa731d7fb3..7b67ef22533 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.html
@@ -15,34 +15,32 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-
-ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
-ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
-ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
-ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+
+ ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
+ ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
+ ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
+ ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js
index d1993a44803..87b88a09f4e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.outside.worker.js
@@ -13,30 +13,29 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-
-ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
-ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
-ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
-ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+
+ ctx.putImageData(imgdata, 100, 20, 20, 20, -20, -20);
+ ctx.putImageData(imgdata, 200, 200, 0, 0, 100, 50);
+ ctx.putImageData(imgdata, 40, 20, -30, -20, 30, 20);
+ ctx.putImageData(imgdata, -30, 20, 0, 0, 30, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 98,45, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,5, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 1,45, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html
index 17a14cfe9e1..9f571427a87 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js
index d694e2ef435..6feea9556de 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect1.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, 40, 20, 0, 0, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html
index df1f6fe0392..997c1136a1a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(60, 30, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(60, 30, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js
index 6652b1a9307..752a3cdf1e1 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.rect2.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#0f0';
-ctx.fillRect(60, 30, 20, 20)
-
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(40, 20, 20, 20)
-ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
-
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
-_assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(60, 30, 20, 20)
+
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(40, 20, 20, 20)
+ ctx.putImageData(imgdata, -20, -10, 60, 30, 20, 20);
+
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 35,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 65,25, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,15, 0,255,0,255, 2);
+ _assertPixelApprox(canvas, 50,45, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html
index 2e6462895c4..fb90a017e1c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js
index db09379c624..2fa474c07f7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.dirty.zero.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.putImageData(imgdata, 0, 0, 0, 0, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html
index 04f64600cd6..337701aaf5a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(45, 20, 10, 10)
-var imgdata = ctx.getImageData(45, 20, 10, 10);
-for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
-{
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
-}
-ctx.putImageData(imgdata, 45, 20);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(45, 20, 10, 10)
+ var imgdata = ctx.getImageData(45, 20, 10, 10);
+ for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
+ {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ }
+ ctx.putImageData(imgdata, 45, 20);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js
index b238d56cf96..846a9dbc2df 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.modified.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-ctx.fillStyle = '#f00';
-ctx.fillRect(45, 20, 10, 10)
-var imgdata = ctx.getImageData(45, 20, 10, 10);
-for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
-{
- imgdata.data[i] = 0;
- imgdata.data[i+1] = 255;
-}
-ctx.putImageData(imgdata, 45, 20);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(45, 20, 10, 10)
+ var imgdata = ctx.getImageData(45, 20, 10, 10);
+ for (var i = 0, len = imgdata.width*imgdata.height*4; i < len; i += 4)
+ {
+ imgdata.data[i] = 0;
+ imgdata.data[i+1] = 255;
+ }
+ ctx.putImageData(imgdata, 45, 20);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html
index c8f322c2f03..eb61d38e9ef 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.html
@@ -15,97 +15,95 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
-})(canvas, ctx);
-t.done();
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js
index c63d66f0dc7..479ad69467c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.nonfinite.worker.js
@@ -13,93 +13,92 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = ctx.getImageData(0, 0, 10, 10);
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = ctx.getImageData(0, 0, 10, 10);
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, -Infinity, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, NaN, 10, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, -Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, NaN, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, -Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, NaN, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, -Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, NaN, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, -Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, NaN, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, -Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, 10, NaN); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, Infinity, 10, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, Infinity, 10, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, Infinity, 10, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, 10); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, Infinity, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, Infinity, 10, Infinity); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 10, 10, 10, 10, Infinity, Infinity); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html
index 82eb5c28b66..89fe06686d2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.html
@@ -15,15 +15,13 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
-})(canvas, ctx);
-t.done();
+ assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js
index 0b5b746ba0f..2f021b638e7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.null.worker.js
@@ -13,11 +13,10 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ assert_throws_js(TypeError, function() { ctx.putImageData(null, 0, 0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html
index 8d63a4287d2..6c323760060 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.rect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.putImageData(imgdata, 0, 0);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.rect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.putImageData(imgdata, 0, 0);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js
index 81bd03eb4f2..66781a922d9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.path.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.rect(0, 0, 100, 50);
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.putImageData(imgdata, 0, 0);
-ctx.fillStyle = '#0f0';
-ctx.fill();
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.rect(0, 0, 100, 50);
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.putImageData(imgdata, 0, 0);
+ ctx.fillStyle = '#0f0';
+ ctx.fill();
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html
index 048818fdba5..3d3e99b1356 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.html
@@ -15,27 +15,25 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 1;
-ctx.translate(100, 50);
-ctx.scale(0.1, 0.1);
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-})(canvas, ctx);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 1;
+ ctx.translate(100, 50);
+ ctx.scale(0.1, 0.1);
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js
index 9b931717f0a..75adb865ef9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unaffected.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50)
-var imgdata = ctx.getImageData(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50)
-ctx.globalAlpha = 0.1;
-ctx.globalCompositeOperation = 'destination-atop';
-ctx.shadowColor = '#f00';
-ctx.shadowBlur = 1;
-ctx.translate(100, 50);
-ctx.scale(0.1, 0.1);
-ctx.putImageData(imgdata, 0, 0);
-_assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50)
+ var imgdata = ctx.getImageData(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50)
+ ctx.globalAlpha = 0.1;
+ ctx.globalCompositeOperation = 'destination-atop';
+ ctx.shadowColor = '#f00';
+ ctx.shadowBlur = 1;
+ ctx.translate(100, 50);
+ ctx.scale(0.1, 0.1);
+ ctx.putImageData(imgdata, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html
index cab36f19e1e..d78fa4e0357 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-var i = 0;
-for (var y = 0; y < 16; ++y) {
- for (var x = 0; x < 16; ++x, ++i) {
- ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
- ctx.fillRect(x, y, 1, 1);
- }
-}
-var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-var olddata = [];
-for (var i = 0; i < imgdata1.data.length; ++i)
- olddata[i] = imgdata1.data[i];
-
-ctx.putImageData(imgdata1, 0.1, 0.2);
-
-var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-for (var i = 0; i < imgdata2.data.length; ++i) {
- _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
-}
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ var i = 0;
+ for (var y = 0; y < 16; ++y) {
+ for (var x = 0; x < 16; ++x, ++i) {
+ ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
+ ctx.fillRect(x, y, 1, 1);
+ }
+ }
+ var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ var olddata = [];
+ for (var i = 0; i < imgdata1.data.length; ++i)
+ olddata[i] = imgdata1.data[i];
+
+ ctx.putImageData(imgdata1, 0.1, 0.2);
+
+ var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ for (var i = 0; i < imgdata2.data.length; ++i) {
+ _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
+ }
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js
index 07f4362f43c..5e9362fab28 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.unchanged.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-var i = 0;
-for (var y = 0; y < 16; ++y) {
- for (var x = 0; x < 16; ++x, ++i) {
- ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
- ctx.fillRect(x, y, 1, 1);
- }
-}
-var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-var olddata = [];
-for (var i = 0; i < imgdata1.data.length; ++i)
- olddata[i] = imgdata1.data[i];
+ var i = 0;
+ for (var y = 0; y < 16; ++y) {
+ for (var x = 0; x < 16; ++x, ++i) {
+ ctx.fillStyle = 'rgba(' + i + ',' + (Math.floor(i*1.5) % 256) + ',' + (Math.floor(i*23.3) % 256) + ',' + (i/256) + ')';
+ ctx.fillRect(x, y, 1, 1);
+ }
+ }
+ var imgdata1 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ var olddata = [];
+ for (var i = 0; i < imgdata1.data.length; ++i)
+ olddata[i] = imgdata1.data[i];
-ctx.putImageData(imgdata1, 0.1, 0.2);
-
-var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
-for (var i = 0; i < imgdata2.data.length; ++i) {
- _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
-}
-t.done();
+ ctx.putImageData(imgdata1, 0.1, 0.2);
+ var imgdata2 = ctx.getImageData(0.1, 0.2, 15.8, 15.9);
+ for (var i = 0; i < imgdata2.data.length; ++i) {
+ _assertSame(olddata[i], imgdata2.data[i], "olddata[\""+(i)+"\"]", "imgdata2.data[\""+(i)+"\"]");
+ }
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html
index d726d5f9684..1488e7b111d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.html
@@ -15,18 +15,16 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
-})(canvas, ctx);
-t.done();
+ var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js
index 9c58133ac96..bf4d6dfedf9 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/pixel-manipulation/2d.imageData.put.wrongtype.worker.js
@@ -13,14 +13,13 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
-assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
-assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
-t.done();
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+ var imgdata = { width: 1, height: 1, data: [255, 0, 0, 255] };
+ assert_throws_js(TypeError, function() { ctx.putImageData(imgdata, 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData("cheese", 0, 0); });
+ assert_throws_js(TypeError, function() { ctx.putImageData(42, 0, 0); });
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.html
index 83815f367b7..d438c274338 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.scale(2, 1);
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -50, 50, 50);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(2, 1);
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -50, 50, 50);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js
index d00fe230efb..219cbe84211 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.order.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(2, 1);
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -50, 50, 50);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 1);
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -50, 50, 50);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html
index c20608f81c8..fb0f2950621 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -100, 50, 100);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -100, 50, 100);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js
index 8506937583e..b92b7d83689 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.direction.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI / 2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, -100, 50, 100);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(Math.PI / 2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, -100, 50, 100);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html
index bbc294a24fe..dbde38370db 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.rotate(Infinity);
-ctx.rotate(-Infinity);
-ctx.rotate(NaN);
+ ctx.translate(100, 10);
+ ctx.rotate(Infinity);
+ ctx.rotate(-Infinity);
+ ctx.rotate(NaN);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js
index 2c892a561b2..52b6605e45b 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.nonfinite.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.rotate(Infinity);
-ctx.rotate(-Infinity);
-ctx.rotate(NaN);
+ ctx.translate(100, 10);
+ ctx.rotate(Infinity);
+ ctx.rotate(-Infinity);
+ ctx.rotate(NaN);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html
index 75121e39d7f..28006028ca7 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js
index 8c2fdd8ab08..08516911560 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.radians.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(Math.PI); // should fail obviously if this is 3.1 degrees
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html
index 1f9eb838c81..aea14ceddfb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
-// We need about pi +/- 0.001 in order to get correct-looking results
-// 32-bit floats can store pi*4097 with precision 2^-10, so that should
-// be safe enough on reasonable implementations
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
+ // We need about pi +/- 0.001 in order to get correct-looking results
+ // 32-bit floats can store pi*4097 with precision 2^-10, so that should
+ // be safe enough on reasonable implementations
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js
index 579a1b6dd68..4d0c2f5b5d4 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrap.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
-// We need about pi +/- 0.001 in order to get correct-looking results
-// 32-bit floats can store pi*4097 with precision 2^-10, so that should
-// be safe enough on reasonable implementations
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(Math.PI * (1 + 4096)); // == pi (mod 2*pi)
+ // We need about pi +/- 0.001 in order to get correct-looking results
+ // 32-bit floats can store pi*4097 with precision 2^-10, so that should
+ // be safe enough on reasonable implementations
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html
index c06f6453155..7363007a4db 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.rotate(-Math.PI * (1 + 4096));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.rotate(-Math.PI * (1 + 4096));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js
index cce91071210..932ecf65125 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.wrapnegative.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(-Math.PI * (1 + 4096));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-_assertPixel(canvas, 98,2, 0,255,0,255);
-_assertPixel(canvas, 98,47, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(-Math.PI * (1 + 4096));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ _assertPixel(canvas, 98,2, 0,255,0,255);
+ _assertPixel(canvas, 98,47, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html
index 0101fa27c58..965d0e07682 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.rotate(0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.rotate(0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js
index 1ad0aa59853..659c9fd7a05 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.rotate.zero.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.rotate(0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rotate(0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html
index 5c70438ba16..d4063f7129e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.scale(2, 4);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 12.5);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(2, 4);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 12.5);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js
index 73be61007a5..5e79daf3f42 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.basic.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(2, 4);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 12.5);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(2, 4);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 12.5);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html
index 8974545500a..ae8f954a713 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.scale(1e5, 1e5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 1, 1);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(1e5, 1e5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 1, 1);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js
index 30af9631e6c..6d716277280 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.large.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(1e5, 1e5);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 1, 1);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(1e5, 1e5);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 1, 1);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html
index b07acf15ce6..6a899d1dd6a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js
index 267a7df9441..921e95aa721 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.multiple.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.scale(Math.sqrt(2), Math.sqrt(2));
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.scale(Math.sqrt(2), Math.sqrt(2));
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html
index b516c1154f4..68c5780332c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.html
@@ -15,30 +15,28 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.save();
-ctx.scale(-1, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-50, 0, 50, 50);
-ctx.restore();
-
-ctx.save();
-ctx.scale(1, -1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, -50, 50, 50);
-ctx.restore();
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.scale(-1, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-50, 0, 50, 50);
+ ctx.restore();
+
+ ctx.save();
+ ctx.scale(1, -1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, -50, 50, 50);
+ ctx.restore();
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js
index 0e68f7e8d8c..cb0f01c618f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.negative.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.save();
-ctx.scale(-1, 1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-50, 0, 50, 50);
-ctx.restore();
-
-ctx.save();
-ctx.scale(1, -1);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(50, -50, 50, 50);
-ctx.restore();
-_assertPixel(canvas, 25,25, 0,255,0,255);
-_assertPixel(canvas, 75,25, 0,255,0,255);
-t.done();
+ ctx.save();
+ ctx.scale(-1, 1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-50, 0, 50, 50);
+ ctx.restore();
+ ctx.save();
+ ctx.scale(1, -1);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(50, -50, 50, 50);
+ ctx.restore();
+ _assertPixel(canvas, 25,25, 0,255,0,255);
+ _assertPixel(canvas, 75,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html
index 3d9c75a0dc0..5fd95629c9f 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.html
@@ -15,30 +15,28 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.scale(Infinity, 0.1);
-ctx.scale(-Infinity, 0.1);
-ctx.scale(NaN, 0.1);
-ctx.scale(0.1, Infinity);
-ctx.scale(0.1, -Infinity);
-ctx.scale(0.1, NaN);
-ctx.scale(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.scale(Infinity, 0.1);
+ ctx.scale(-Infinity, 0.1);
+ ctx.scale(NaN, 0.1);
+ ctx.scale(0.1, Infinity);
+ ctx.scale(0.1, -Infinity);
+ ctx.scale(0.1, NaN);
+ ctx.scale(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js
index 67c5c104481..35f9c90e71c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.nonfinite.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.scale(Infinity, 0.1);
-ctx.scale(-Infinity, 0.1);
-ctx.scale(NaN, 0.1);
-ctx.scale(0.1, Infinity);
-ctx.scale(0.1, -Infinity);
-ctx.scale(0.1, NaN);
-ctx.scale(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.scale(Infinity, 0.1);
+ ctx.scale(-Infinity, 0.1);
+ ctx.scale(NaN, 0.1);
+ ctx.scale(0.1, Infinity);
+ ctx.scale(0.1, -Infinity);
+ ctx.scale(0.1, NaN);
+ ctx.scale(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html
index 4b664125c22..b4269bd1405 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.html
@@ -15,32 +15,30 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.save();
-ctx.translate(50, 0);
-ctx.scale(0, 1);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-ctx.save();
-ctx.translate(0, 25);
-ctx.scale(1, 0);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.scale(0, 1);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ ctx.save();
+ ctx.translate(0, 25);
+ ctx.scale(1, 0);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js
index dc52323bc23..9e90127cfed 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.scale.zero.worker.js
@@ -13,28 +13,27 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.save();
-ctx.translate(50, 0);
-ctx.scale(0, 1);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-ctx.save();
-ctx.translate(0, 25);
-ctx.scale(1, 0);
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-ctx.restore();
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.save();
+ ctx.translate(50, 0);
+ ctx.scale(0, 1);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ ctx.save();
+ ctx.translate(0, 25);
+ ctx.scale(1, 0);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.restore();
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html
index e28710858b1..0395c561bf6 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.html
@@ -15,23 +15,21 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.setTransform(1/2,0, 0,1/2, 0,0);
-ctx.setTransform();
-ctx.setTransform(2,0, 0,2, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.setTransform(1/2,0, 0,1/2, 0,0);
+ ctx.setTransform();
+ ctx.setTransform(2,0, 0,2, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js
index b6b004601fb..e3e6daf8784 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.multiple.worker.js
@@ -13,19 +13,18 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.setTransform(1/2,0, 0,1/2, 0,0);
-ctx.setTransform();
-ctx.setTransform(2,0, 0,2, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 50, 25);
-_assertPixel(canvas, 75,35, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.setTransform(1/2,0, 0,1/2, 0,0);
+ ctx.setTransform();
+ ctx.setTransform(2,0, 0,2, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 25);
+ _assertPixel(canvas, 75,35, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html
index 03c1b74579f..474b20a10b0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.html
@@ -15,98 +15,96 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(NaN, 0, 0, 0, 0, 0);
-ctx.setTransform(0, Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, NaN, 0, 0, 0, 0);
-ctx.setTransform(0, 0, Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, NaN, 0, 0, 0);
-ctx.setTransform(0, 0, 0, Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, NaN, 0, 0);
-ctx.setTransform(0, 0, 0, 0, Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, NaN, 0);
-ctx.setTransform(0, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, NaN);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(NaN, 0, 0, 0, 0, 0);
+ ctx.setTransform(0, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, NaN, 0, 0, 0, 0);
+ ctx.setTransform(0, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, NaN, 0, 0, 0);
+ ctx.setTransform(0, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, NaN, 0, 0);
+ ctx.setTransform(0, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, NaN, 0);
+ ctx.setTransform(0, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, NaN);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js
index bd48262ca7d..d99ea52deab 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.nonfinite.worker.js
@@ -13,94 +13,93 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
-ctx.setTransform(NaN, 0, 0, 0, 0, 0);
-ctx.setTransform(0, Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
-ctx.setTransform(0, NaN, 0, 0, 0, 0);
-ctx.setTransform(0, 0, Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
-ctx.setTransform(0, 0, NaN, 0, 0, 0);
-ctx.setTransform(0, 0, 0, Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
-ctx.setTransform(0, 0, 0, NaN, 0, 0);
-ctx.setTransform(0, 0, 0, 0, Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
-ctx.setTransform(0, 0, 0, 0, NaN, 0);
-ctx.setTransform(0, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
-ctx.setTransform(0, 0, 0, 0, 0, NaN);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
-ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
-ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
-ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
-ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.setTransform(NaN, 0, 0, 0, 0, 0);
+ ctx.setTransform(0, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, -Infinity, 0, 0, 0, 0);
+ ctx.setTransform(0, NaN, 0, 0, 0, 0);
+ ctx.setTransform(0, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, -Infinity, 0, 0, 0);
+ ctx.setTransform(0, 0, NaN, 0, 0, 0);
+ ctx.setTransform(0, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, -Infinity, 0, 0);
+ ctx.setTransform(0, 0, 0, NaN, 0, 0);
+ ctx.setTransform(0, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, -Infinity, 0);
+ ctx.setTransform(0, 0, 0, 0, NaN, 0);
+ ctx.setTransform(0, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, -Infinity);
+ ctx.setTransform(0, 0, 0, 0, 0, NaN);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.setTransform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.setTransform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.setTransform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.setTransform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.setTransform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.setTransform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.setTransform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.setTransform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.setTransform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html
index c49d9d8a298..2d24d61f4b0 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.html
@@ -15,43 +15,41 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.setTransform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.setTransform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js
index 6f4b4769b61..161f4087e53 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.setTransform.skewed.worker.js
@@ -13,39 +13,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
-
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.setTransform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-t.done();
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.setTransform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html
index 1efa306707c..d88b3bc03c5 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.transform(1,0, 0,1, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.transform(1,0, 0,1, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js
index 51a11ee03de..67202628c67 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.identity.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.transform(1,0, 0,1, 0,0);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.transform(1,0, 0,1, 0,0);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html
index 05a1e7e5ead..a7dfbe5f344 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.html
@@ -15,22 +15,20 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.transform(1,2, 3,4, 5,6);
-ctx.transform(-2,1, 3/2,-1/2, 1,-2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.transform(1,2, 3,4, 5,6);
+ ctx.transform(-2,1, 3/2,-1/2, 1,-2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js
index 61a5f052dc7..aa89a7d8caa 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.multiply.worker.js
@@ -13,18 +13,17 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.transform(1,2, 3,4, 5,6);
-ctx.transform(-2,1, 3/2,-1/2, 1,-2);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.transform(1,2, 3,4, 5,6);
+ ctx.transform(-2,1, 3/2,-1/2, 1,-2);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html
index b81bda463bd..c4cd459c8bb 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.html
@@ -15,98 +15,96 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.transform(Infinity, 0, 0, 0, 0, 0);
-ctx.transform(-Infinity, 0, 0, 0, 0, 0);
-ctx.transform(NaN, 0, 0, 0, 0, 0);
-ctx.transform(0, Infinity, 0, 0, 0, 0);
-ctx.transform(0, -Infinity, 0, 0, 0, 0);
-ctx.transform(0, NaN, 0, 0, 0, 0);
-ctx.transform(0, 0, Infinity, 0, 0, 0);
-ctx.transform(0, 0, -Infinity, 0, 0, 0);
-ctx.transform(0, 0, NaN, 0, 0, 0);
-ctx.transform(0, 0, 0, Infinity, 0, 0);
-ctx.transform(0, 0, 0, -Infinity, 0, 0);
-ctx.transform(0, 0, 0, NaN, 0, 0);
-ctx.transform(0, 0, 0, 0, Infinity, 0);
-ctx.transform(0, 0, 0, 0, -Infinity, 0);
-ctx.transform(0, 0, 0, 0, NaN, 0);
-ctx.transform(0, 0, 0, 0, 0, Infinity);
-ctx.transform(0, 0, 0, 0, 0, -Infinity);
-ctx.transform(0, 0, 0, 0, 0, NaN);
-ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, 0, 0, Infinity, 0);
-ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, 0, 0, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, 0, Infinity, 0, Infinity, 0);
-ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, 0, 0, Infinity);
-ctx.transform(0, 0, 0, Infinity, Infinity, 0);
-ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, 0, Infinity, 0, Infinity);
-ctx.transform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.transform(Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(NaN, 0, 0, 0, 0, 0);
+ ctx.transform(0, Infinity, 0, 0, 0, 0);
+ ctx.transform(0, -Infinity, 0, 0, 0, 0);
+ ctx.transform(0, NaN, 0, 0, 0, 0);
+ ctx.transform(0, 0, Infinity, 0, 0, 0);
+ ctx.transform(0, 0, -Infinity, 0, 0, 0);
+ ctx.transform(0, 0, NaN, 0, 0, 0);
+ ctx.transform(0, 0, 0, Infinity, 0, 0);
+ ctx.transform(0, 0, 0, -Infinity, 0, 0);
+ ctx.transform(0, 0, 0, NaN, 0, 0);
+ ctx.transform(0, 0, 0, 0, Infinity, 0);
+ ctx.transform(0, 0, 0, 0, -Infinity, 0);
+ ctx.transform(0, 0, 0, 0, NaN, 0);
+ ctx.transform(0, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, 0, -Infinity);
+ ctx.transform(0, 0, 0, 0, 0, NaN);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js
index ee675151b3a..c96af44b59d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.nonfinite.worker.js
@@ -13,94 +13,93 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 10);
-ctx.transform(Infinity, 0, 0, 0, 0, 0);
-ctx.transform(-Infinity, 0, 0, 0, 0, 0);
-ctx.transform(NaN, 0, 0, 0, 0, 0);
-ctx.transform(0, Infinity, 0, 0, 0, 0);
-ctx.transform(0, -Infinity, 0, 0, 0, 0);
-ctx.transform(0, NaN, 0, 0, 0, 0);
-ctx.transform(0, 0, Infinity, 0, 0, 0);
-ctx.transform(0, 0, -Infinity, 0, 0, 0);
-ctx.transform(0, 0, NaN, 0, 0, 0);
-ctx.transform(0, 0, 0, Infinity, 0, 0);
-ctx.transform(0, 0, 0, -Infinity, 0, 0);
-ctx.transform(0, 0, 0, NaN, 0, 0);
-ctx.transform(0, 0, 0, 0, Infinity, 0);
-ctx.transform(0, 0, 0, 0, -Infinity, 0);
-ctx.transform(0, 0, 0, 0, NaN, 0);
-ctx.transform(0, 0, 0, 0, 0, Infinity);
-ctx.transform(0, 0, 0, 0, 0, -Infinity);
-ctx.transform(0, 0, 0, 0, 0, NaN);
-ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
-ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
-ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
-ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
-ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
-ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
-ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
-ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
-ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
-ctx.transform(0, Infinity, 0, 0, Infinity, 0);
-ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
-ctx.transform(0, Infinity, 0, 0, 0, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
-ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
-ctx.transform(0, 0, Infinity, 0, Infinity, 0);
-ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
-ctx.transform(0, 0, Infinity, 0, 0, Infinity);
-ctx.transform(0, 0, 0, Infinity, Infinity, 0);
-ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
-ctx.transform(0, 0, 0, Infinity, 0, Infinity);
-ctx.transform(0, 0, 0, 0, Infinity, Infinity);
+ ctx.translate(100, 10);
+ ctx.transform(Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(-Infinity, 0, 0, 0, 0, 0);
+ ctx.transform(NaN, 0, 0, 0, 0, 0);
+ ctx.transform(0, Infinity, 0, 0, 0, 0);
+ ctx.transform(0, -Infinity, 0, 0, 0, 0);
+ ctx.transform(0, NaN, 0, 0, 0, 0);
+ ctx.transform(0, 0, Infinity, 0, 0, 0);
+ ctx.transform(0, 0, -Infinity, 0, 0, 0);
+ ctx.transform(0, 0, NaN, 0, 0, 0);
+ ctx.transform(0, 0, 0, Infinity, 0, 0);
+ ctx.transform(0, 0, 0, -Infinity, 0, 0);
+ ctx.transform(0, 0, 0, NaN, 0, 0);
+ ctx.transform(0, 0, 0, 0, Infinity, 0);
+ ctx.transform(0, 0, 0, 0, -Infinity, 0);
+ ctx.transform(0, 0, 0, 0, NaN, 0);
+ ctx.transform(0, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, 0, -Infinity);
+ ctx.transform(0, 0, 0, 0, 0, NaN);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, 0);
+ ctx.transform(Infinity, 0, 0, 0, Infinity, Infinity);
+ ctx.transform(Infinity, 0, 0, 0, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, 0);
+ ctx.transform(0, Infinity, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, Infinity, 0, 0, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, 0);
+ ctx.transform(0, Infinity, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, Infinity, 0, Infinity);
+ ctx.transform(0, Infinity, 0, 0, Infinity, 0);
+ ctx.transform(0, Infinity, 0, 0, Infinity, Infinity);
+ ctx.transform(0, Infinity, 0, 0, 0, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, 0);
+ ctx.transform(0, 0, Infinity, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, Infinity, 0, Infinity);
+ ctx.transform(0, 0, Infinity, 0, Infinity, 0);
+ ctx.transform(0, 0, Infinity, 0, Infinity, Infinity);
+ ctx.transform(0, 0, Infinity, 0, 0, Infinity);
+ ctx.transform(0, 0, 0, Infinity, Infinity, 0);
+ ctx.transform(0, 0, 0, Infinity, Infinity, Infinity);
+ ctx.transform(0, 0, 0, Infinity, 0, Infinity);
+ ctx.transform(0, 0, 0, 0, Infinity, Infinity);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html
index 9cb6dfcc52e..2f3c0453e33 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.html
@@ -15,43 +15,41 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.transform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.transform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js
index 638adc14c44..c7ebaf9a832 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.transform.skewed.worker.js
@@ -13,39 +13,38 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-// Create green with a red square ring inside it
-ctx.fillStyle = '#0f0';
-ctx.fillRect(0, 0, 100, 50);
-ctx.fillStyle = '#f00';
-ctx.fillRect(20, 10, 60, 30);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(40, 20, 20, 10);
-
-// Draw a skewed shape to fill that gap, to make sure it is aligned correctly
-ctx.transform(1,4, 2,3, 5,6);
-// Post-transform coordinates:
-// [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
-// Hence pre-transform coordinates:
-var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
- [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
- [-7.4,11.2]];
-ctx.beginPath();
-ctx.moveTo(pts[0][0], pts[0][1]);
-for (var i = 0; i < pts.length; ++i)
- ctx.lineTo(pts[i][0], pts[i][1]);
-ctx.fill();
-_assertPixel(canvas, 21,11, 0,255,0,255);
-_assertPixel(canvas, 79,11, 0,255,0,255);
-_assertPixel(canvas, 21,39, 0,255,0,255);
-_assertPixel(canvas, 79,39, 0,255,0,255);
-_assertPixel(canvas, 39,19, 0,255,0,255);
-_assertPixel(canvas, 61,19, 0,255,0,255);
-_assertPixel(canvas, 39,31, 0,255,0,255);
-_assertPixel(canvas, 61,31, 0,255,0,255);
-t.done();
+ // Create green with a red square ring inside it
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(20, 10, 60, 30);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(40, 20, 20, 10);
+ // Draw a skewed shape to fill that gap, to make sure it is aligned correctly
+ ctx.transform(1,4, 2,3, 5,6);
+ // Post-transform coordinates:
+ // [[20,10],[80,10],[80,40],[20,40],[20,10],[40,20],[40,30],[60,30],[60,20],[40,20],[20,10]];
+ // Hence pre-transform coordinates:
+ var pts=[[-7.4,11.2],[-43.4,59.2],[-31.4,53.2],[4.6,5.2],[-7.4,11.2],
+ [-15.4,25.2],[-11.4,23.2],[-23.4,39.2],[-27.4,41.2],[-15.4,25.2],
+ [-7.4,11.2]];
+ ctx.beginPath();
+ ctx.moveTo(pts[0][0], pts[0][1]);
+ for (var i = 0; i < pts.length; ++i)
+ ctx.lineTo(pts[i][0], pts[i][1]);
+ ctx.fill();
+ _assertPixel(canvas, 21,11, 0,255,0,255);
+ _assertPixel(canvas, 79,11, 0,255,0,255);
+ _assertPixel(canvas, 21,39, 0,255,0,255);
+ _assertPixel(canvas, 79,39, 0,255,0,255);
+ _assertPixel(canvas, 39,19, 0,255,0,255);
+ _assertPixel(canvas, 61,19, 0,255,0,255);
+ _assertPixel(canvas, 39,31, 0,255,0,255);
+ _assertPixel(canvas, 61,31, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html
index 51a7527b5cc..f68225c0776 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.html
@@ -15,21 +15,19 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
-ctx.translate(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+ ctx.translate(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js
index 11e8bd897b4..f377ab8a48c 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.basic.worker.js
@@ -13,17 +13,16 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 50);
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -50, 100, 50);
-_assertPixel(canvas, 90,40, 0,255,0,255);
-t.done();
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.translate(100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -50, 100, 50);
+ _assertPixel(canvas, 90,40, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html
index 010b28f3c6a..ebab949b4cf 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.html
@@ -15,30 +15,28 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
-
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-await (function(canvas, ctx) {
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.translate(Infinity, 0.1);
-ctx.translate(-Infinity, 0.1);
-ctx.translate(NaN, 0.1);
-ctx.translate(0.1, Infinity);
-ctx.translate(0.1, -Infinity);
-ctx.translate(0.1, NaN);
-ctx.translate(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-})(canvas, ctx);
-t.done();
+t.step(function() {
+
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.translate(Infinity, 0.1);
+ ctx.translate(-Infinity, 0.1);
+ ctx.translate(NaN, 0.1);
+ ctx.translate(0.1, Infinity);
+ ctx.translate(0.1, -Infinity);
+ ctx.translate(0.1, NaN);
+ ctx.translate(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js
index c3ff3a31a8c..7ad6fce2ba3 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/transformations/2d.transformation.translate.nonfinite.worker.js
@@ -13,26 +13,25 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d');
-
-ctx.fillStyle = '#f00';
-ctx.fillRect(0, 0, 100, 50);
-
-ctx.translate(100, 10);
-ctx.translate(Infinity, 0.1);
-ctx.translate(-Infinity, 0.1);
-ctx.translate(NaN, 0.1);
-ctx.translate(0.1, Infinity);
-ctx.translate(0.1, -Infinity);
-ctx.translate(0.1, NaN);
-ctx.translate(Infinity, Infinity);
-
-ctx.fillStyle = '#0f0';
-ctx.fillRect(-100, -10, 100, 50);
-
-_assertPixel(canvas, 50,25, 0,255,0,255);
-t.done();
-
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d');
+
+ ctx.fillStyle = '#f00';
+ ctx.fillRect(0, 0, 100, 50);
+
+ ctx.translate(100, 10);
+ ctx.translate(Infinity, 0.1);
+ ctx.translate(-Infinity, 0.1);
+ ctx.translate(NaN, 0.1);
+ ctx.translate(0.1, Infinity);
+ ctx.translate(0.1, -Infinity);
+ ctx.translate(0.1, NaN);
+ ctx.translate(Infinity, Infinity);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(-100, -10, 100, 50);
+
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html
index d307dbe96d9..e1391e9010e 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.html
@@ -15,27 +15,25 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
-await (function(canvas, ctx) {
-var color_style = 'rgb(50, 100, 150)';
-// [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
-var pixel_expected = [62, 99, 146, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
+ var color_style = 'rgb(50, 100, 150)';
+ // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
+ var pixel_expected = [62, 99, 146, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-})(canvas, ctx);
-t.done();
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js
index c5242daab6b..844cd93f813 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.p3.worker.js
@@ -13,23 +13,22 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
-var color_style = 'rgb(50, 100, 150)';
-// [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
-var pixel_expected = [62, 99, 146, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
-
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-t.done();
+ var color_style = 'rgb(50, 100, 150)';
+ // [0.24304, 0.38818, 0.57227, 1.0] * 255 = [62, 99, 146, 255]
+ var pixel_expected = [62, 99, 146, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "display-p3", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
index 8427a752b09..06287444210 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.html
@@ -15,26 +15,24 @@ var t_pass = t.done.bind(t);
var t_fail = t.step_func(function(reason) {
throw reason;
});
-t.step(async function() {
+t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
-await (function(canvas, ctx) {
-var color_style = 'rgb(50, 100, 150)';
-var pixel_expected = [50, 100, 150, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
+ var color_style = 'rgb(50, 100, 150)';
+ var pixel_expected = [50, 100, 150, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-})(canvas, ctx);
-t.done();
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
+ t.done();
});
</script>
diff --git a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js
index 3f8fb4b289c..619c59076da 100644
--- a/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js
+++ b/tests/wpt/web-platform-tests/html/canvas/offscreen/wide-gamut-canvas/2d.color.space.p3.to.srgb.worker.js
@@ -13,22 +13,21 @@ var t_fail = t.step_func(function(reason) {
});
t.step(function() {
-var canvas = new OffscreenCanvas(100, 50);
-var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
+ var canvas = new OffscreenCanvas(100, 50);
+ var ctx = canvas.getContext('2d', {colorSpace: "display-p3"});
-var color_style = 'rgb(50, 100, 150)';
-var pixel_expected = [50, 100, 150, 255];
-var epsilon = 2;
-ctx.fillStyle = color_style;
-ctx.fillRect(0, 0, 10, 10);
-
-var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
-_assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
-assert_approx_equals(pixel[0], pixel_expected[0], 2);
-assert_approx_equals(pixel[1], pixel_expected[1], 2);
-assert_approx_equals(pixel[2], pixel_expected[2], 2);
-assert_approx_equals(pixel[3], pixel_expected[3], 2);
-t.done();
+ var color_style = 'rgb(50, 100, 150)';
+ var pixel_expected = [50, 100, 150, 255];
+ var epsilon = 2;
+ ctx.fillStyle = color_style;
+ ctx.fillRect(0, 0, 10, 10);
+ var pixel = ctx.getImageData(5, 5, 1, 1, {colorSpace: "srgb", storageFormat: "uint8"}).data;
+ _assertSame(pixel.length, pixel_expected.length, "pixel.length", "pixel_expected.length");
+ assert_approx_equals(pixel[0], pixel_expected[0], 2);
+ assert_approx_equals(pixel[1], pixel_expected[1], 2);
+ assert_approx_equals(pixel[2], pixel_expected[2], 2);
+ assert_approx_equals(pixel[3], pixel_expected[3], 2);
+ t.done();
});
done();
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py
index bb734b31c66..e923a0777ba 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/gentestutilsunion.py
@@ -287,18 +287,30 @@ def _write_reference_test(is_js_ref: bool, templates: Mapping[str, str],
def _write_testharness_test(templates: Mapping[str, str],
template_params: MutableMapping[str, str],
+ test_type: str,
canvas_path: Optional[str],
offscreen_path: Optional[str]):
-
# Create test cases for canvas and offscreencanvas.
+ code = template_params['code']
+ template_params['code'] = textwrap.indent(code, ' ')
if canvas_path:
+ template_name = 'element'
+ if test_type:
+ template_name += '-' + test_type
+
pathlib.Path(f'{canvas_path}.html').write_text(
- templates['element'] % template_params, 'utf-8')
+ templates[template_name] % template_params, 'utf-8')
if offscreen_path:
- code = template_params['code']
- offscreen_template = templates['offscreen']
- worker_template = templates['worker']
+ offscreen_template_name = 'offscreen'
+ worker_template_name = 'worker'
+ if test_type:
+ offscreen_template_name += '-' + test_type
+ worker_template_name += '-' + test_type
+
+ offscreen_template = templates[offscreen_template_name]
+ worker_template = templates[worker_template_name]
+
if ('then(t_pass, t_fail);' in code):
offscreen_template = offscreen_template.replace('t.done();\n', '')
worker_template = worker_template.replace('t.done();\n', '')
@@ -443,6 +455,19 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str],
f'Test {name} is invalid, "reference" and "html_reference" can\'t '
'both be specified at the same time.')
+ test_type = ''
+ if 'test_type' in test:
+ test_type = test['test_type']
+ if test_type != 'promise':
+ raise InvalidTestDefinitionError(
+ f'Test {name}\' test_type is invalid, it only accepts '
+ '"promise" now for creating promise test type in the template '
+ 'file.')
+ if js_reference is not None or html_reference is not None:
+ raise InvalidTestDefinitionError(
+ f'Test {name}: promise test type cannot be used together with '
+ 'html_reference or js_reference.')
+
ref_code = js_reference or html_reference
if ref_code is not None:
_write_reference_test(
@@ -451,7 +476,7 @@ def _generate_test(test: Mapping[str, Any], templates: Mapping[str, str],
offscreen_path if offscreen_canvas_cfg.enabled else None)
else:
_write_testharness_test(
- templates, template_params,
+ templates, template_params, test_type,
canvas_path if html_canvas_cfg.enabled else None,
offscreen_path if offscreen_canvas_cfg.enabled else None)
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml
index 703af3c2cb3..0940471dd4d 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/templates-new.yaml
@@ -16,19 +16,39 @@ offscreen: |
var t_fail = t.step_func(function(reason) {
throw reason;
});
- t.step(async function() {
+ t.step(function() {
- var canvas = new OffscreenCanvas(%(width)s, %(height)s);
- var ctx = canvas.getContext(%(context_args)s);
+ var canvas = new OffscreenCanvas(%(width)s, %(height)s);
+ var ctx = canvas.getContext(%(context_args)s);
- await (function(canvas, ctx) {
%(code)s
- })(canvas, ctx);
- t.done();
+ t.done();
});
</script>
+offscreen-promise: |
+ <!DOCTYPE html>
+ <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+ <title>OffscreenCanvas test: %(name)s</title>%(timeout)s
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/html/canvas/resources/canvas-tests.js"></script>
+
+ <h1>%(name)s</h1>
+ <p class="desc">%(desc)s</p>
+
+ %(notes)s
+ <script>
+ promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(%(width)s, %(height)s);
+ var ctx = canvas.getContext(%(context_args)s);
+
+ %(code)s
+
+ }, "%(desc)s");
+ </script>
worker: |
%(timeout_js)s// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
@@ -46,16 +66,34 @@ worker: |
});
t.step(function() {
- var canvas = new OffscreenCanvas(%(width)s, %(height)s);
- var ctx = canvas.getContext(%(context_args)s);
+ var canvas = new OffscreenCanvas(%(width)s, %(height)s);
+ var ctx = canvas.getContext(%(context_args)s);
%(code)s
- t.done();
-
+ t.done();
});
done();
+worker-promise: |
+ %(timeout_js)s// DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py.
+ // OffscreenCanvas test in a worker:%(name)s
+ // Description:%(desc)s
+ // Note:%(notes)s
+
+ importScripts("/resources/testharness.js");
+ importScripts("/html/canvas/resources/canvas-tests.js");
+
+ promise_test(async t => {
+
+ var canvas = new OffscreenCanvas(%(width)s, %(height)s);
+ var ctx = canvas.getContext(%(context_args)s);
+
+ %(code)s
+ t.done();
+ }, "%(desc)s");
+ done();
+
element: |
<!DOCTYPE html>
<!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
@@ -80,11 +118,39 @@ element: |
%(code)s
-
}%(attributes)s);
</script>
%(images)s
+element-promise: |
+ <!DOCTYPE html>
+ <!-- DO NOT EDIT! This test has been generated by /html/canvas/tools/gentest.py. -->
+ <title>Canvas test: %(name)s</title>
+ <script src="/resources/testharness.js"></script>
+ <script src="/resources/testharnessreport.js"></script>
+ <script src="/html/canvas/resources/canvas-tests.js"></script>
+ <link rel="stylesheet" href="/html/canvas/resources/canvas-tests.css">
+ %(fonts)s<body class="show_output">
+
+ <h1>%(name)s</h1>
+ <p class="desc">%(desc)s</p>
+
+ %(notes)s
+ %(fonthack)s<p class="output">Actual output:</p>
+ <canvas id="c" class="output" width="%(width)s" height="%(height)s"%(canvas)s>%(fallback)s</canvas>
+ %(expected)s
+ <ul id="d"></ul>
+ <script>
+ promise_test(async t => {
+
+ var canvas = document.getElementById('c');
+ var ctx = canvas.getContext('2d'%(attributes)s);
+
+ %(code)s
+
+ }, "%(desc)s");
+ </script>
+ %(images)s
offscreen_ref_test: |-
<!DOCTYPE html>
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/compositing.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/compositing.yaml
index e808206bdab..0051f07db23 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/compositing.yaml
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/compositing.yaml
@@ -1,7 +1,10 @@
- name: 2d.composite.globalAlpha.range
code: |
ctx.globalAlpha = 0.5;
- var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
+ @assert ctx.globalAlpha === a;
ctx.globalAlpha = 1.1;
@assert ctx.globalAlpha === a;
ctx.globalAlpha = -0.1;
@@ -14,7 +17,9 @@
- name: 2d.composite.globalAlpha.invalid
code: |
ctx.globalAlpha = 0.5;
- var a = ctx.globalAlpha; // might not be exactly 0.5, if it is rounded/quantised, so remember for future comparisons
+ // This may not set it to exactly 0.5 if it is rounded/quantised, so
+ // remember for future comparisons.
+ var a = ctx.globalAlpha;
ctx.globalAlpha = Infinity;
@assert ctx.globalAlpha === a;
ctx.globalAlpha = -Infinity;
@@ -30,7 +35,8 @@
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
@assert pixel 50,25 ==~ 2,253,0,255;
@@ -48,7 +54,8 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
ctx.drawImage(canvas2, 0, 0);
@assert pixel 50,25 ==~ 2,253,0,255;
expected: green
@@ -66,7 +73,8 @@
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
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
ctx.fillRect(0, 0, 100, 50);
@assert pixel 50,25 ==~ 2,253,0,255;
expected: green
@@ -150,21 +158,18 @@
- name: 2d.composite.globalAlpha.image
- canvasType: ['OffscreenCanvas']
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
-
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 2,253,0,255;
- });
- });
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 2,253,0,255;
expected: green
- name: 2d.composite.globalAlpha.canvas
@@ -176,27 +181,25 @@
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
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
ctx.drawImage(offscreenCanvas2, 0, 0);
@assert pixel 50,25 ==~ 2,253,0,255;
- name: 2d.composite.globalAlpha.imagepattern
- canvasType: ['OffscreenCanvas']
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
-
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 ==~ 2,253,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.fillStyle = ctx.createPattern(bitmap, 'no-repeat');
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
+ ctx.fillRect(0, 0, 100, 50);
+ @assert pixel 50,25 ==~ 2,253,0,255;
expected: green
- name: 2d.composite.globalAlpha.canvaspattern
@@ -209,7 +212,8 @@
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.fillStyle = ctx.createPattern(offscreenCanvas2, 'no-repeat');
- ctx.globalAlpha = 0.01; // avoid any potential alpha=0 optimisations
+ // Avoiding any potential alpha = 0 optimisations.
+ ctx.globalAlpha = 0.01;
ctx.fillRect(0, 0, 100, 50);
@assert pixel 50,25 ==~ 2,253,0,255;
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml
index 4442f1ad481..e1837342e6a 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/drawing-images-to-the-canvas.yaml
@@ -1,78 +1,3 @@
-- name: 2d.drawImage.3arg
- canvasType: ['HTMLCanvas']
- images:
- - red.png
- - green.png
- code: |
- ctx.drawImage(document.getElementById('green.png'), 0, 0);
- ctx.drawImage(document.getElementById('red.png'), -100, 0);
- ctx.drawImage(document.getElementById('red.png'), 100, 0);
- ctx.drawImage(document.getElementById('red.png'), 0, -50);
- ctx.drawImage(document.getElementById('red.png'), 0, 50);
-
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- expected: green
-
-- name: 2d.drawImage.5arg
- canvasType: ['HTMLCanvas']
- images:
- - red.png
- - green.png
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(document.getElementById('green.png'), 50, 0, 50, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 50, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 50, 50);
-
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- expected: green
-
-- name: 2d.drawImage.9arg.destpos
- canvasType: ['HTMLCanvas']
- images:
- - red.png
- - green.png
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(document.getElementById('green.png'), 0, 0, 100, 50, 0, 0, 100, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -100, 0, 100, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 100, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -50, 100, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- expected: green
-
-- name: 2d.drawImage.9arg.destsize
- canvasType: ['HTMLCanvas']
- images:
- - red.png
- - green.png
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(document.getElementById('green.png'), 1, 1, 1, 1, 0, 0, 100, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, -50, 0, 50, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 100, 0, 50, 50);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, -25, 100, 25);
- ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50, 0, 50, 100, 25);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- expected: green
-
- name: 2d.drawImage.canvas
canvasType: ['HTMLCanvas']
code: |
@@ -149,28 +74,6 @@
code: |
@assert throws TypeError ctx.drawImage(document.createElement('p'), 0, 0);
-- name: 2d.drawImage.outsidesource
- DISABLED: fix this to match the current spec (transparent black outside source)
- canvasType: ['HTMLCanvas']
- mozilla: {throws: !!null ''}
- images:
- - green.png
- - red.png
- code: |
- ctx.drawImage(document.getElementById('green.png'), 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50);
- ctx.drawImage(document.getElementById('green.png'), 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50);
- ctx.drawImage(document.getElementById('green.png'), 100, 50, -5, -5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), -0.001, 0, 100, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 0, -0.001, 100, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 0, 0, 100.001, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 0, 0, 100, 50.001, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 0, 0, -5, 5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 0, 0, 5, -5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(document.getElementById('red.png'), 110, 60, -20, -20, 0, 0, 100, 50);
- @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
- expected: green
-
- name: 2d.drawImage.incomplete.nosrc
canvasType: ['HTMLCanvas']
mozilla: {throws: !!null ''}
@@ -300,247 +203,147 @@
# TODO: drawImage shadows
- name: 2d.drawImage.3arg
- canvasType: ['OffscreenCanvas']
- timeout: long
- images:
- - red.png
- - green.png
- code: |
- var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0);
- ctx.drawImage(bitmap1, -100, 0);
- ctx.drawImage(bitmap1, 100, 0);
- ctx.drawImage(bitmap1, 0, -50);
- ctx.drawImage(bitmap1, 0, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- }, t_fail);
- }).then(t_pass, t_fail);
+ test_type: promise
+ code: |
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0);
+ ctx.drawImage(bitmap_red, -100, 0);
+ ctx.drawImage(bitmap_red, 100, 0);
+ ctx.drawImage(bitmap_red, 0, -50);
+ ctx.drawImage(bitmap_red, 0, 50);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
- name: 2d.drawImage.5arg
- images:
- - red.png
- - green.png
- canvasType: ['OffscreenCanvas']
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 50, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 50, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- }, t_fail);
- }).then(t_pass, t_fail);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 50, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 50, 50);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
- name: 2d.drawImage.9arg.basic
- images:
- - green.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/green.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0, 100, 50, 0, 0, 100, 50);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.9arg.sourcepos
- images:
- - rgrg-256x256.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 140, 20, 100, 50, 0, 0, 100, 50);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.9arg.sourcesize
- images:
- - rgrg-256x256.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/rgrg-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 51, 26);
- ctx.fillRect(49, 24, 51, 26);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- @assert pixel 20,20 ==~ 0,255,0,255;
- @assert pixel 80,20 ==~ 0,255,0,255;
- @assert pixel 20,30 ==~ 0,255,0,255;
- @assert pixel 80,30 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/rgrg-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 0, 256, 256, 0, 0, 100, 50);
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 51, 26);
+ ctx.fillRect(49, 24, 51, 26);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
+ @assert pixel 20,20 ==~ 0,255,0,255;
+ @assert pixel 80,20 ==~ 0,255,0,255;
+ @assert pixel 20,30 ==~ 0,255,0,255;
+ @assert pixel 80,30 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.9arg.destpos
- canvasType: ['OffscreenCanvas']
- images:
- - red.png
- - green.png
- timeout: long
+ test_type: promise
code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 0, 0, 100, 50, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -50, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 50);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- }, t_fail);
- }).then(t_pass, t_fail);
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 0, 0, 100, 50, -100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -50, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 50);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
- name: 2d.drawImage.9arg.destsize
- canvasType: ['OffscreenCanvas']
- images:
- - red.png
- - green.png
- timeout: long
+ test_type: promise
code: |
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 1, 1, 1, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, -50, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 100, 0, 50, 50);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, -25, 100, 25);
- ctx.drawImage(bitmap1, 0, 0, 100, 50, 0, 50, 100, 25);
- @assert pixel 0,0 ==~ 0,255,0,255;
- @assert pixel 99,0 ==~ 0,255,0,255;
- @assert pixel 0,49 ==~ 0,255,0,255;
- @assert pixel 99,49 ==~ 0,255,0,255;
- }, t_fail);
- }).then(t_pass, t_fail);
+ ctx.drawImage(bitmap_green, 1, 1, 1, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, -50, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 100, 0, 50, 50);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, -25, 100, 25);
+ ctx.drawImage(bitmap_red, 0, 0, 100, 50, 0, 50, 100, 25);
+ @assert pixel 0,0 ==~ 0,255,0,255;
+ @assert pixel 99,0 ==~ 0,255,0,255;
+ @assert pixel 0,49 ==~ 0,255,0,255;
+ @assert pixel 99,49 ==~ 0,255,0,255;
- name: 2d.drawImage.canvas
canvasType: ['OffscreenCanvas']
- timeout: long
code: |
var offscreenCanvas2 = new OffscreenCanvas(100, 50);
var ctx2 = offscreenCanvas2.getContext('2d');
@@ -555,7 +358,6 @@
- name: 2d.drawImage.zerocanvas
canvasType: ['OffscreenCanvas']
- timeout: long
code: |
var offscreenCanvas2 = new OffscreenCanvas(0, 10);
@assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0);
@@ -569,380 +371,341 @@
@assert throws INVALID_STATE_ERR ctx.drawImage(offscreenCanvas2, 0, 0);
- name: 2d.drawImage.floatsource
- timeout: long
- code: |
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ test_type: promise
+ code: |
+ const response = await fetch('/images/green.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10.1, 10.1, 0.1, 0.1, 0, 0, 100, 50);
+ @assert pixel 50,25 ==~ 0,255,0,255;
Expected: green
- name: 2d.drawImage.zerosource
desc: drawImage with zero-sized source rectangle draws nothing without exception
- timeout: long
- images:
- - red.png
+ test_type: promise
+ code: |
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
+ ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
+ @assert pixel 50,25 ==~ 0,255,0,255;
+ expected: green
+
+- name: 2d.drawImage.zerosource.image
+ desc: drawImage with zero-sized source rectangle from image draws nothing without exception
+ test_type: promise
+ canvasType: ['HTMLCanvas']
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- const red = async () => await createImageBitmap(await (await fetch("/images/red.png")).blob());
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 10, 10, 0, 1, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 1, 0, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 10, 10, 0, 0, 0, 0, 100, 50);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
+
+ function loadImage(src) {
+ return new Promise((resolve, reject) => {
+ const img = new Image();
+ img.onload = () => resolve(img);
+ img.onerror = (err) => reject(err);
+ img.src = src;
});
+ }
+ const img1 = await loadImage('/images/red-zerowidth.svg');
+ const img2 = await loadImage('/images/red-zeroheight.svg');
+ const img3 = await loadImage('/images/red-zerosize.svg');
+
+ ctx.drawImage(img1, 0, 0, 100, 50);
+ ctx.drawImage(img2, 0, 0, 100, 50);
+ ctx.drawImage(img3, 0, 0, 100, 50);
+ _assertPixel(canvas, 50, 25, 0, 255, 0, 255);
expected: green
- name: 2d.drawImage.zerosource.image
desc: drawImage with zero-sized source rectangle from image draws nothing without exception
- images:
- - red-zerowidth.svg
- - red-zeroheight.svg
- - red-zerosize.svg
- timeout: long
+ test_type: promise
+ canvasType: ['OffscreenCanvas']
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/red-zerowidth.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- });
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/red-zerowidth.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0, 100, 50);
+ _assertPixel(canvas, 50,25, 0,255,0,255);
+ });
});
expected: green
- name: 2d.drawImage.negativesource
desc: Negative source width/height represents the correct rectangle
mozilla: {throws: !!null ''}
- images:
- - ggrr-256x256.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
- ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
- @assert pixel 1,1 ==~ 0,255,0,255;
- @assert pixel 1,48 ==~ 0,255,0,255;
- @assert pixel 98,1 ==~ 0,255,0,255;
- @assert pixel 98,48 ==~ 0,255,0,255;
- @assert pixel 48,1 ==~ 0,255,0,255;
- @assert pixel 48,48 ==~ 0,255,0,255;
- @assert pixel 51,1 ==~ 0,255,0,255;
- @assert pixel 51,48 ==~ 0,255,0,255;
- @assert pixel 25,25 ==~ 0,255,0,255;
- @assert pixel 75,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, -100, 50, 0, 0, 50, 50);
+ ctx.drawImage(bitmap, 100, 128, -100, -50, 50, 0, 50, 50);
+ @assert pixel 1,1 ==~ 0,255,0,255;
+ @assert pixel 1,48 ==~ 0,255,0,255;
+ @assert pixel 98,1 ==~ 0,255,0,255;
+ @assert pixel 98,48 ==~ 0,255,0,255;
+ @assert pixel 48,1 ==~ 0,255,0,255;
+ @assert pixel 48,48 ==~ 0,255,0,255;
+ @assert pixel 51,1 ==~ 0,255,0,255;
+ @assert pixel 51,48 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.negativedest
desc: Negative destination width/height represents the correct rectangle
mozilla: {throws: !!null ''}
- timeout: long
- images:
- - ggrr-256x256.png
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
- ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
- @assert pixel 1,1 ==~ 0,255,0,255;
- @assert pixel 1,48 ==~ 0,255,0,255;
- @assert pixel 98,1 ==~ 0,255,0,255;
- @assert pixel 98,48 ==~ 0,255,0,255;
- @assert pixel 48,1 ==~ 0,255,0,255;
- @assert pixel 48,48 ==~ 0,255,0,255;
- @assert pixel 51,1 ==~ 0,255,0,255;
- @assert pixel 51,48 ==~ 0,255,0,255;
- @assert pixel 25,25 ==~ 0,255,0,255;
- @assert pixel 75,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 100, 78, 50, 50, 0, 50, 50, -50);
+ ctx.drawImage(bitmap, 100, 128, 50, -50, 100, 50, -50, -50);
+ @assert pixel 1,1 ==~ 0,255,0,255;
+ @assert pixel 1,48 ==~ 0,255,0,255;
+ @assert pixel 98,1 ==~ 0,255,0,255;
+ @assert pixel 98,48 ==~ 0,255,0,255;
+ @assert pixel 48,1 ==~ 0,255,0,255;
+ @assert pixel 48,48 ==~ 0,255,0,255;
+ @assert pixel 51,1 ==~ 0,255,0,255;
+ @assert pixel 51,48 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.negativedir
desc: Negative dimensions do not affect the direction of the image
mozilla: {throws: !!null ''}
- timeout: long
- images:
- - ggrr-256x256.png
+ test_type: promise
code: |
ctx.fillStyle = '#f00';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/ggrr-256x256.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
- ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
- @assert pixel 1,1 ==~ 0,255,0,255;
- @assert pixel 1,48 ==~ 0,255,0,255;
- @assert pixel 98,1 ==~ 0,255,0,255;
- @assert pixel 98,48 ==~ 0,255,0,255;
- @assert pixel 48,1 ==~ 0,255,0,255;
- @assert pixel 48,48 ==~ 0,255,0,255;
- @assert pixel 51,1 ==~ 0,255,0,255;
- @assert pixel 51,48 ==~ 0,255,0,255;
- @assert pixel 25,25 ==~ 0,255,0,255;
- @assert pixel 75,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/ggrr-256x256.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+ ctx.drawImage(bitmap, 0, 178, 50, -100, 0, 0, 50, 100);
+ ctx.drawImage(bitmap, 0, 78, 50, 100, 50, 100, 50, -100);
+ @assert pixel 1,1 ==~ 0,255,0,255;
+ @assert pixel 1,48 ==~ 0,255,0,255;
+ @assert pixel 98,1 ==~ 0,255,0,255;
+ @assert pixel 98,48 ==~ 0,255,0,255;
+ @assert pixel 48,1 ==~ 0,255,0,255;
+ @assert pixel 48,48 ==~ 0,255,0,255;
+ @assert pixel 51,1 ==~ 0,255,0,255;
+ @assert pixel 51,48 ==~ 0,255,0,255;
+ @assert pixel 25,25 ==~ 0,255,0,255;
+ @assert pixel 75,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.outsidesource
DISABLED: fix this to match the current spec (transparent black outside source)
canvasType: ['OffscreenCanvas']
code: |
- var promise1 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/red.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- var promise2 = new Promise(function(resolve, reject) {
- var xhr = new XMLHttpRequest();
- xhr.open("GET", '/images/green.png');
- xhr.responseType = 'blob';
- xhr.send();
- xhr.onload = function() {
- resolve(xhr.response);
- };
- });
- Promise.all([promise1, promise2]).then(function(response1, response2) {
- var promise3 = createImageBitmap(response1);
- var promise4 = createImageBitmap(response2);
- Promise.all([promise3, promise4]).then(function(bitmap1, bitmap2) {
- ctx.drawImage(bitmap2, 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50);
- ctx.drawImage(bitmap2, 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50);
- ctx.drawImage(bitmap2, 100, 50, -5, -5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, -0.001, 0, 100, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, -0.001, 100, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100.001, 50, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100, 50.001, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, -5, 5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 5, -5, 0, 0, 100, 50);
- @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 110, 60, -20, -20, 0, 0, 100, 50);
- @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
- });
- });
+ const response_red = await fetch('/images/red.png');
+ const blob_red = await response_red.blob();
+ const bitmap_red = await createImageBitmap(blob_red);
+
+ const response_green = await fetch('/images/green.png');
+ const blob_green = await response_green.blob();
+ const bitmap_green = await createImageBitmap(blob_green);
+ ctx.drawImage(bitmap_green, 10.5, 10.5, 89.5, 39.5, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 5.5, 5.5, -5.5, -5.5, 0, 0, 100, 50);
+ ctx.drawImage(bitmap_green, 100, 50, -5, -5, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, -0.001, 0, 100, 50, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, -0.001, 100, 50, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100.001, 50, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 100, 50.001, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 50, 0, 50.001, 50, 0, 0, 100, 50); @moz-todo
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, -5, 5, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 0, 0, 5, -5, 0, 0, 100, 50);
+ @assert throws INDEX_SIZE_ERR ctx.drawImage(bitmap1, 110, 60, -20, -20, 0, 0, 100, 50);
+ @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
expected: green
- name: 2d.drawImage.broken
- timeout: long
- code: |
- fetch('/images/broken.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
- });
+ test_type: promise
+ code: |
+ const response = await fetch('/images/broken.png');
+ const blob = await response.blob();
+
+ await promise_rejects_dom(t, 'InvalidStateError', createImageBitmap(blob), 'The source image could not be decoded.');
+ expected: green
+
+- name: 2d.drawImage.svg
+ desc: drawImage() of an SVG image
+ test_type: promise
+ canvasType: ['HTMLCanvas']
+ code: |
+ const img = new Image();
+ const imageLoadPromise = new Promise((resolve, reject) => {
+ img.onload = () => resolve();
+ img.onerror = (err) => reject(err);
});
+ img.src = '/images/green.svg';
+ await imageLoadPromise;
+
+ ctx.drawImage(img, 0, 0);
+ _assertPixelApprox(canvas, 50, 25, 0, 255, 0, 255, 2);
expected: green
+
- name: 2d.drawImage.svg
desc: drawImage() of an SVG image
- timeout: long
- code: |
- fetch('/images/green.svg')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
+ test_type: promise
+ canvasType: ['OffscreenCanvas']
+ code: |
+ var promise = new Promise(function(resolve, reject) {
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", '/images/green.svg');
+ xhr.responseType = 'blob';
+ xhr.send();
+ xhr.onload = function() {
+ resolve(xhr.response);
+ };
+ });
+ promise.then(function(response) {
+ createImageBitmap(response).then(bitmap => {
+ ctx.drawImage(bitmap, 0, 0);
+ _assertPixelApprox(canvas, 50,25, 0,255,0,255, 2);
+ });
});
expected: green
- name: 2d.drawImage.animated.poster
desc: drawImage() of an APNG draws the poster frame
- images:
- - anim-poster-gr.png
- timeout: long
- code: |
- fetch('anim-poster-gr.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
- });
- });
+ test_type: promise
+ code: |
+ const response = await fetch('/images/anim-poster-gr.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 0,255,0,255; @moz-todo
expected: green
- name: 2d.drawImage.path
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.rect(0, 0, 100, 50);
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- ctx.fill();
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ ctx.fill();
+ @assert pixel 50,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.transform
- images:
- - red.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.translate(100, 0);
- fetch('red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.alpha
- images:
- - red.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalAlpha = 0;
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.clip
- images:
- - red.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.rect(-10, -10, 1, 1);
ctx.clip();
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(-10, -10, 1, 1);
- ctx.clip();
- ctx.drawImage(document.getElementById('red.png'), 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.fillStyle = '#0f0';
+ ctx.fillRect(0, 0, 100, 50);
+ ctx.rect(-10, -10, 1, 1);
+ ctx.clip();
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.composite
- images:
- - red.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
ctx.globalCompositeOperation = 'destination-over';
- fetch('/images/red.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, 0, 0);
- @assert pixel 50,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/red.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, 0, 0);
+ @assert pixel 50,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.nowrap
desc: Stretched images do not get pixels wrapping around the edges
- images:
- - redtransparent.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- ctx.drawImage(bitmap, -1950, 0, 2000, 50);
- @assert pixel 45,25 ==~ 0,255,0,255;
- @assert pixel 50,25 ==~ 0,255,0,255;
- @assert pixel 55,25 ==~ 0,255,0,255;
- });
- });
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ ctx.drawImage(bitmap, -1950, 0, 2000, 50);
+ @assert pixel 45,25 ==~ 0,255,0,255;
+ @assert pixel 50,25 ==~ 0,255,0,255;
+ @assert pixel 55,25 ==~ 0,255,0,255;
expected: green
- name: 2d.drawImage.nonfinite
desc: drawImage() with Infinity/NaN is ignored
- images:
- - red.png
- timeout: long
+ test_type: promise
code: |
ctx.fillStyle = '#0f0';
ctx.fillRect(0, 0, 100, 50);
- fetch('/images/redtransparent.png')
- .then(response => response.blob())
- .then(blob => {
- createImageBitmap(blob)
- .then(bitmap => {
- @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>);
- @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- @assert pixel 50,25 == 0,255,0,255;
- });
- });
+ const response = await fetch('/images/redtransparent.png');
+ const blob = await response.blob();
+ const bitmap = await createImageBitmap(blob);
+
+ @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>);
+ @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
+ @nonfinite ctx.drawImage(<bitmap>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <100 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
+ @assert pixel 50,25 == 0,255,0,255;
expected: green
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml
index 6889e164bfb..d398ef2b5a2 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/layers.yaml
@@ -8,10 +8,14 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- %(render_states)s
+ %(render-states)s
ctx.beginLayer();
+ // Enable compositing in the layer to validate that draw calls in the layer
+ // won't individually composite with the background.
+ ctx.globalCompositeOperation = 'screen';
+
ctx.fillStyle = 'rgba(225, 0, 0, 1)';
ctx.fillRect(50, 50, 75, 50);
ctx.fillStyle = 'rgba(0, 255, 0, 1)';
@@ -25,65 +29,140 @@
circle.arc(90, 90, 45, 0, 2 * Math.PI);
ctx.fill(circle);
- %(render_states)s
+ %(render-states)s
canvas2 = document.createElement("canvas");
ctx2 = canvas2.getContext("2d");
+ ctx2.globalCompositeOperation = 'screen';
ctx2.fillStyle = 'rgba(225, 0, 0, 1)';
ctx2.fillRect(50, 50, 75, 50);
ctx2.fillStyle = 'rgba(0, 255, 0, 1)';
ctx2.fillRect(70, 70, 75, 50);
ctx.drawImage(canvas2, 0, 0);
- variants:
- no_global_states:
- render_states: // No global states.
+ variants: &global-state-variants
+ no-global-states:
+ render-states: // No global states.
alpha:
- render_states: ctx.globalAlpha = 0.6;
- globalcompositeoperation:
- render_states: ctx.globalCompositeOperation = 'source-in';
+ render-states: ctx.globalAlpha = 0.6;
+ blending:
+ render-states: ctx.globalCompositeOperation = 'multiply';
+ composite:
+ render-states: ctx.globalCompositeOperation = 'source-in';
shadow:
- render_states: |-
+ render-states: |-
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
- filter:
- render_states: ctx.filter = 'sepia(1) opacity(30%)';
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+ alpha.blending:
+ render-states: |-
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'multiply';
+ alpha.composite:
+ render-states: |-
+ ctx.globalAlpha = 0.6;
+ ctx.globalCompositeOperation = 'source-in';
alpha.shadow:
- render_states: |-
+ render-states: |-
ctx.globalAlpha = 0.5;
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
- alpha.filter:
- render_states: |-
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+ alpha.blending.shadow:
+ render-states: |-
ctx.globalAlpha = 0.6;
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
- alpha.filter.shadow:
- fuzzy: maxDifference=0-2; totalPixels=0-5824
- render_states: |-
- ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5) drop-shadow(5px 5px 0px #81e)';
+ ctx.globalCompositeOperation = 'multiply';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'orange';
- alpha.filter.globalcompositeoperation:
- render_states: |-
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+ alpha.composite.shadow:
+ render-states: |-
ctx.globalAlpha = 0.6;
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
- filter.shadow:
- fuzzy: maxDifference=0-1; totalPixels=0-49
- render_states: |-
- ctx.filter = 'sepia(1) opacity(70%)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
- ctx.shadowColor = 'rgba(0,1,0,0.5)';
- filter.globalcompositeoperation:
- render_states: |-
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+ blending.shadow:
+ render-states: |-
+ ctx.globalCompositeOperation = 'multiply';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+ composite.shadow:
+ render-states: |-
ctx.globalCompositeOperation = 'source-in';
- ctx.filter = 'drop-shadow(-9px 9px 0px #e81)';
+ ctx.shadowOffsetX = -10;
+ ctx.shadowOffsetY = 10;
+ ctx.shadowColor = 'rgba(255, 165, 0, 0.5)';
+
+
+- name: 2d.layer.global-states.filter
+ desc: Checks that layers with filters correctly use global render states.
+ size: 200, 200
+ code: |
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ %(render-states)s
+
+ ctx.beginLayer([
+ {filter: 'colorMatrix', values: [0.393, 0.769, 0.189, 0, 0,
+ 0.349, 0.686, 0.168, 0, 0,
+ 0.272, 0.534, 0.131, 0, 0,
+ 0, 0, 0, 1, 0]},
+ {filter: 'componentTransfer',
+ funcA: {type: "table", tableValues: [0, 0.7]}},
+ {filter: 'dropShadow', dx: 5, dy: 5, floodColor: '#81e'}]);
+
+ ctx.fillStyle = 'rgba(200, 0, 0, 1)';
+ ctx.fillRect(50, 50, 75, 50);
+ ctx.fillStyle = 'rgba(0, 200, 0, 1)';
+ ctx.fillRect(70, 70, 75, 50);
+
+ ctx.endLayer();
+ reference: |
+ const svg = `
+ <svg xmlns="http://www.w3.org/2000/svg"
+ width="200" height="200"
+ color-interpolation-filters="sRGB">
+ <filter id="filter" x="-100%%" y="-100%%" width="300%%" height="300%%">
+ <feColorMatrix
+ type="matrix"
+ values="0.393 0.769 0.189 0 0
+ 0.349 0.686 0.168 0 0
+ 0.272 0.534 0.131 0 0
+ 0 0 0 1 0" />
+ <feComponentTransfer>
+ <feFuncA type="table" tableValues="0 0.7"></feFuncA>
+ </feComponentTransfer>
+ <feDropShadow dx="5" dy="5" flood-color="#81e" />
+ </filter>
+ <g filter="url(#filter)">
+ <rect x="50" y="50" width="75" height="50" fill="rgba(200, 0, 0, 1)"/>
+ <rect x="70" y="70" width="75" height="50" fill="rgba(0, 200, 0, 1)"/>
+ </g>
+ </svg>`;
+
+ const img = new Image();
+ img.width = 200;
+ img.height = 200;
+ img.onload = () => {
+ ctx.fillStyle = 'rgba(0, 0, 255, 1)';
+
+ var circle = new Path2D();
+ circle.arc(90, 90, 45, 0, 2 * Math.PI);
+ ctx.fill(circle);
+
+ %(render-states)s
+
+ ctx.drawImage(img, 0, 0);
+ };
+ img.src = 'data:image/svg+xml;base64,' + btoa(svg);
+ variants: *global-state-variants
- name: 2d.layer.nested
@@ -179,7 +258,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
@@ -200,7 +278,6 @@
ctx.fillRect(50, 50, 95, 70);
ctx.globalAlpha = 0.5;
- ctx.filter = 'sepia(0.5)';
ctx.shadowOffsetX = -10;
ctx.shadowOffsetY = 10;
ctx.shadowColor = 'orange';
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/path-objects.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/path-objects.yaml
index eec142c7692..eec142c7692 100644
--- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/element/path-objects.yaml
+++ b/tests/wpt/web-platform-tests/html/canvas/tools/yaml-new/path-objects.yaml
diff --git a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/path-objects.yaml b/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/path-objects.yaml
deleted file mode 100644
index 9c70daf59fc..00000000000
--- a/tests/wpt/web-platform-tests/html/canvas/tools/yaml/offscreen/path-objects.yaml
+++ /dev/null
@@ -1,3073 +0,0 @@
-- name: 2d.path.initial
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.closePath();
- ctx.fillStyle = '#f00';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.beginPath
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.fillStyle = '#f00';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.moveTo.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.rect(0, 0, 10, 50);
- ctx.moveTo(100, 0);
- ctx.lineTo(10, 0);
- ctx.lineTo(10, 50);
- ctx.lineTo(100, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 90,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.moveTo.newsubpath
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.moveTo(0, 0);
- ctx.moveTo(100, 0);
- ctx.moveTo(100, 50);
- ctx.moveTo(0, 50);
- ctx.fillStyle = '#f00';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.moveTo.multiple
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.moveTo(0, 25);
- ctx.moveTo(100, 25);
- ctx.moveTo(0, 25);
- ctx.lineTo(100, 25);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.moveTo.nonfinite
- desc: moveTo() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.moveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.closePath.empty
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.closePath();
- ctx.fillStyle = '#f00';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.closePath.newline
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.moveTo(-100, 25);
- ctx.lineTo(-100, -100);
- ctx.lineTo(200, -100);
- ctx.lineTo(200, 25);
- ctx.closePath();
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.closePath.nextpoint
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.moveTo(-100, 25);
- ctx.lineTo(-100, -1000);
- ctx.closePath();
- ctx.lineTo(1000, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.ensuresubpath.1
- desc: If there is no subpath, the point is added and nothing is drawn
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.lineTo(100, 50);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.ensuresubpath.2
- desc: If there is no subpath, the point is added and used for subsequent drawing
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.lineTo(0, 25);
- ctx.lineTo(100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.lineTo(100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.nextpoint
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(-100, -100);
- ctx.lineTo(0, 25);
- ctx.lineTo(100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.nonfinite
- desc: lineTo() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.lineTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.lineTo.nonfinite.details
- desc: lineTo() with Infinity/NaN for first arg still converts the second arg
- code: |
- for (var arg1 of [Infinity, -Infinity, NaN]) {
- var converted = false;
- ctx.lineTo(arg1, { valueOf: function() { converted = true; return 0; } });
- @assert converted;
- }
- t.done();
-
-- name: 2d.path.quadraticCurveTo.ensuresubpath.1
- desc: If there is no subpath, the first control point is added (and nothing is drawn
- up to it)
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.quadraticCurveTo(100, 50, 200, 50);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 95,45 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.quadraticCurveTo.ensuresubpath.2
- desc: If there is no subpath, the first control point is added
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.quadraticCurveTo(0, 25, 100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 5,45 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.quadraticCurveTo.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.quadraticCurveTo(100, 25, 100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.quadraticCurveTo.shape
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 55;
- ctx.beginPath();
- ctx.moveTo(-1000, 1050);
- ctx.quadraticCurveTo(0, -1000, 1200, 1050);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.quadraticCurveTo.scaled
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.scale(1000, 1000);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 0.055;
- ctx.beginPath();
- ctx.moveTo(-1, 1.05);
- ctx.quadraticCurveTo(0, -1, 1.2, 1.05);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.quadraticCurveTo.nonfinite
- desc: quadraticCurveTo() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.quadraticCurveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.ensuresubpath.1
- desc: If there is no subpath, the first control point is added (and nothing is drawn
- up to it)
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.bezierCurveTo(100, 50, 200, 50, 200, 50);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 95,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.ensuresubpath.2
- desc: If there is no subpath, the first control point is added
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.bezierCurveTo(0, 25, 100, 25, 100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 5,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.bezierCurveTo(100, 25, 100, 25, 100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.shape
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 55;
- ctx.beginPath();
- ctx.moveTo(-2000, 3100);
- ctx.bezierCurveTo(-2000, -1000, 2100, -1000, 2100, 3100);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.scaled
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.scale(1000, 1000);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 0.055;
- ctx.beginPath();
- ctx.moveTo(-2, 3.1);
- ctx.bezierCurveTo(-2, -1, 2.1, -1, 2.1, 3.1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.bezierCurveTo.nonfinite
- desc: bezierCurveTo() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.bezierCurveTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.ensuresubpath.1
- desc: If there is no subpath, the first control point is added (and nothing is drawn
- up to it)
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arcTo(100, 50, 200, 50, 0.1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.ensuresubpath.2
- desc: If there is no subpath, the first control point is added
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.arcTo(0, 25, 50, 250, 0.1); // adds (x1,y1), draws nothing
- ctx.lineTo(100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.coincide.1
- desc: arcTo() has no effect if P0 = P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(0, 25, 50, 1000, 1);
- ctx.lineTo(100, 25);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.arcTo(50, 25, 100, 25, 1);
- ctx.stroke();
- @assert pixel 50,1 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 50,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.coincide.2
- desc: arcTo() draws a straight line to P1 if P1 = P2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, 100, 25, 1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.collinear.1
- desc: arcTo() with all points on a line, and P1 between P0/P2, draws a straight
- line to P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, 200, 25, 1);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(-100, 25);
- ctx.arcTo(0, 25, 100, 25, 1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.collinear.2
- desc: arcTo() with all points on a line, and P2 between P0/P1, draws a straight
- line to P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, 10, 25, 1);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 25);
- ctx.arcTo(200, 25, 110, 25, 1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.collinear.3
- desc: arcTo() with all points on a line, and P0 between P1/P2, draws a straight
- line to P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, -100, 25, 1);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 25);
- ctx.arcTo(200, 25, 0, 25, 1);
- ctx.stroke();
- ctx.beginPath();
- ctx.moveTo(-100, 25);
- ctx.arcTo(0, 25, -200, 25, 1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.shape.curve1
- desc: arcTo() curves in the right kind of shape
- code: |
- var tol = 1.5; // tolerance to avoid antialiasing artifacts
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 10;
- ctx.beginPath();
- ctx.moveTo(10, 25);
- ctx.arcTo(75, 25, 75, 60, 20);
- ctx.stroke();
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.rect(10, 20, 45, 10);
- ctx.moveTo(80, 45);
- ctx.arc(55, 45, 25+tol, 0, -Math.PI/2, true);
- ctx.arc(55, 45, 15-tol, -Math.PI/2, 0, false);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 55,19 == 0,255,0,255;
- @assert pixel 55,20 == 0,255,0,255;
- @assert pixel 55,21 == 0,255,0,255;
- @assert pixel 64,22 == 0,255,0,255;
- @assert pixel 65,21 == 0,255,0,255;
- @assert pixel 72,28 == 0,255,0,255;
- @assert pixel 73,27 == 0,255,0,255;
- @assert pixel 78,36 == 0,255,0,255;
- @assert pixel 79,35 == 0,255,0,255;
- @assert pixel 80,44 == 0,255,0,255;
- @assert pixel 80,45 == 0,255,0,255;
- @assert pixel 80,46 == 0,255,0,255;
- @assert pixel 65,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.shape.curve2
- desc: arcTo() curves in the right kind of shape
- code: |
- var tol = 1.5; // tolerance to avoid antialiasing artifacts
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.rect(10, 20, 45, 10);
- ctx.moveTo(80, 45);
- ctx.arc(55, 45, 25-tol, 0, -Math.PI/2, true);
- ctx.arc(55, 45, 15+tol, -Math.PI/2, 0, false);
- ctx.fill();
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 10;
- ctx.beginPath();
- ctx.moveTo(10, 25);
- ctx.arcTo(75, 25, 75, 60, 20);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 55,19 == 0,255,0,255;
- @assert pixel 55,20 == 0,255,0,255;
- @assert pixel 55,21 == 0,255,0,255;
- @assert pixel 64,22 == 0,255,0,255;
- @assert pixel 65,21 == 0,255,0,255;
- @assert pixel 72,28 == 0,255,0,255;
- @assert pixel 73,27 == 0,255,0,255;
- @assert pixel 78,36 == 0,255,0,255;
- @assert pixel 79,35 == 0,255,0,255;
- @assert pixel 80,44 == 0,255,0,255;
- @assert pixel 80,45 == 0,255,0,255;
- @assert pixel 80,46 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.shape.start
- desc: arcTo() draws a straight line from P0 to P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(200, 25, 200, 50, 10);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.shape.end
- desc: arcTo() does not draw anything from P1 to P2
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.beginPath();
- ctx.moveTo(-100, -100);
- ctx.arcTo(-100, 25, 200, 25, 10);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.negative
- desc: arcTo() with negative radius throws an exception
- code: |
- @assert throws INDEX_SIZE_ERR ctx.arcTo(0, 0, 0, 0, -1);
- t.done();
-
-- name: 2d.path.arcTo.zero.1
- desc: arcTo() with zero radius draws a straight line from P0 to P1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, 100, 100, 0);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(0, -25);
- ctx.arcTo(50, -25, 50, 50, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.zero.2
- desc: arcTo() with zero radius draws a straight line from P0 to P1, even when all
- points are collinear
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arcTo(100, 25, -100, 25, 0);
- ctx.stroke();
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 25);
- ctx.arcTo(200, 25, 50, 25, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.transformation
- desc: arcTo joins up to the last subpath point correctly
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 50);
- ctx.translate(100, 0);
- ctx.arcTo(50, 50, 50, 0, 50);
- ctx.lineTo(-100, 0);
- ctx.fill();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.scale
- desc: arcTo scales the curve, not just the control points
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 50);
- ctx.translate(100, 0);
- ctx.scale(0.1, 1);
- ctx.arcTo(50, 50, 50, 0, 50);
- ctx.lineTo(-1000, 0);
- ctx.fill();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arcTo.nonfinite
- desc: arcTo() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.arcTo(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-
-- name: 2d.path.arc.empty
- desc: arc() with an empty path does not draw a straight line to the start point
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.nonempty
- desc: arc() with a non-empty path does draw a straight line to the start point
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arc(200, 25, 5, 0, 2*Math.PI, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.end
- desc: arc() adds the end point of the arc to the subpath
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(-100, 0);
- ctx.arc(-100, 0, 25, -Math.PI/2, Math.PI/2, true);
- ctx.lineTo(100, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.default
- desc: arc() with missing last argument defaults to clockwise
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 0);
- ctx.arc(100, 0, 150, -Math.PI, Math.PI/2);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.1
- desc: arc() draws pi/2 .. -pi anticlockwise correctly
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 0);
- ctx.arc(100, 0, 150, Math.PI/2, -Math.PI, true);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.2
- desc: arc() draws -3pi/2 .. -pi anticlockwise correctly
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 0);
- ctx.arc(100, 0, 150, -3*Math.PI/2, -Math.PI, true);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.3
- desc: arc() wraps angles mod 2pi when anticlockwise and end > start+2pi
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 0);
- ctx.arc(100, 0, 150, (512+1/2)*Math.PI, (1024-1)*Math.PI, true);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.4
- desc: arc() draws a full circle when clockwise and end > start+2pi
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.arc(50, 25, 60, (512+1/2)*Math.PI, (1024-1)*Math.PI, false);
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.5
- desc: arc() wraps angles mod 2pi when clockwise and start > end+2pi
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(100, 0);
- ctx.arc(100, 0, 150, (1024-1)*Math.PI, (512+1/2)*Math.PI, false);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.angle.6
- desc: arc() draws a full circle when anticlockwise and start > end+2pi
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.arc(50, 25, 60, (1024-1)*Math.PI, (512+1/2)*Math.PI, true);
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.zero.1
- desc: arc() draws nothing when startAngle = endAngle and anticlockwise
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 0, true);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.zero.2
- desc: arc() draws nothing when startAngle = endAngle and clockwise
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 0, false);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.twopie.1
- desc: arc() draws nothing when end = start + 2pi-e and anticlockwise
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, true);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.twopie.2
- desc: arc() draws a full circle when end = start + 2pi-e and clockwise
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 2*Math.PI - 1e-4, false);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.twopie.3
- desc: arc() draws a full circle when end = start + 2pi+e and anticlockwise
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, true);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.twopie.4
- desc: arc() draws nothing when end = start + 2pi+e and clockwise
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.arc(50, 25, 50, 0, 2*Math.PI + 1e-4, false);
- ctx.stroke();
- @assert pixel 50,20 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.shape.1
- desc: arc() from 0 to pi does not draw anything in the wrong half
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arc(50, 50, 50, 0, Math.PI, false);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 20,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.shape.2
- desc: arc() from 0 to pi draws stuff in the right half
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 100;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.arc(50, 50, 50, 0, Math.PI, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 20,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.shape.3
- desc: arc() from 0 to -pi/2 does not draw anything in the wrong quadrant
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 100;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arc(0, 50, 50, 0, -Math.PI/2, false);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255; @moz-todo
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.shape.4
- desc: arc() from 0 to -pi/2 draws stuff in the right quadrant
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 150;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.arc(-50, 50, 100, 0, -Math.PI/2, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.shape.5
- desc: arc() from 0 to 5pi does not draw crazy things
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 200;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arc(300, 0, 100, 0, 5*Math.PI, false);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.selfintersect.1
- desc: arc() with lineWidth > 2*radius is drawn sensibly
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 200;
- ctx.strokeStyle = '#f00';
- ctx.beginPath();
- ctx.arc(100, 50, 25, 0, -Math.PI/2, true);
- ctx.stroke();
- ctx.beginPath();
- ctx.arc(0, 0, 25, 0, -Math.PI/2, true);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255; @moz-todo
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.selfintersect.2
- desc: arc() with lineWidth > 2*radius is drawn sensibly
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 180;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.arc(-50, 50, 25, 0, -Math.PI/2, true);
- ctx.stroke();
- ctx.beginPath();
- ctx.arc(100, 0, 25, 0, -Math.PI/2, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,10 == 0,255,0,255;
- @assert pixel 97,1 == 0,255,0,255;
- @assert pixel 97,2 == 0,255,0,255;
- @assert pixel 97,3 == 0,255,0,255;
- @assert pixel 2,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.negative
- desc: arc() with negative radius throws INDEX_SIZE_ERR
- code: |
- @assert throws INDEX_SIZE_ERR ctx.arc(0, 0, -1, 0, 0, true);
- t.done();
-
-- name: 2d.path.arc.zeroradius
- desc: arc() with zero radius draws a line to the start point
- code: |
- ctx.fillStyle = '#f00'
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 25);
- ctx.arc(200, 25, 0, 0, Math.PI, true);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.scale.1
- desc: Non-uniformly scaled arcs are the right shape
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.scale(2, 0.5);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.arc(25, 50, 56, 0, 2*Math.PI, false);
- ctx.fill();
- ctx.fillStyle = '#f00';
- ctx.beginPath();
- ctx.moveTo(-25, 50);
- ctx.arc(-25, 50, 24, 0, 2*Math.PI, false);
- ctx.moveTo(75, 50);
- ctx.arc(75, 50, 24, 0, 2*Math.PI, false);
- ctx.moveTo(25, -25);
- ctx.arc(25, -25, 24, 0, 2*Math.PI, false);
- ctx.moveTo(25, 125);
- ctx.arc(25, 125, 24, 0, 2*Math.PI, false);
- ctx.fill();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.scale.2
- desc: Highly scaled arcs are the right shape
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.scale(100, 100);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 1.2;
- ctx.beginPath();
- ctx.arc(0, 0, 0.6, 0, Math.PI/2, false);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 50,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 98,25 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 50,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.arc.nonfinite
- desc: arc() with Infinity/NaN is ignored
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.arc(<0 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <0 Infinity -Infinity NaN>, <2*Math.PI Infinity -Infinity NaN>, <true>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-
-- name: 2d.path.rect.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.rect(0, 0, 100, 50);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.newsubpath
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.moveTo(-100, 25);
- ctx.lineTo(-50, 25);
- ctx.rect(200, 25, 1, 1);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.closed
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 200;
- ctx.lineJoin = 'miter';
- ctx.rect(100, 50, 100, 100);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.end.1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.rect(200, 100, 400, 1000);
- ctx.lineTo(-2000, -1000);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.end.2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 450;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'bevel';
- ctx.rect(150, 150, 2000, 2000);
- ctx.lineTo(160, 160);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.rect(0, 50, 100, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.rect(50, -100, 0, 250);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.3
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.rect(50, 25, 0, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.4
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.rect(100, 25, 0, 0);
- ctx.lineTo(0, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.5
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.moveTo(0, 0);
- ctx.rect(100, 25, 0, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.zero.6
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 1.5;
- ctx.lineWidth = 200;
- ctx.beginPath();
- ctx.rect(100, 25, 1000, 0);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.rect.negative
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.fillStyle = '#0f0';
- ctx.rect(0, 0, 50, 25);
- ctx.rect(100, 0, -50, 25);
- ctx.rect(0, 50, 50, -25);
- ctx.rect(100, 50, -50, -25);
- ctx.fill();
- @assert pixel 25,12 == 0,255,0,255;
- @assert pixel 75,12 == 0,255,0,255;
- @assert pixel 25,37 == 0,255,0,255;
- @assert pixel 75,37 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.winding
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.fillStyle = '#f00';
- ctx.rect(0, 0, 50, 50);
- ctx.rect(100, 50, -50, -50);
- ctx.rect(0, 25, 100, -25);
- ctx.rect(100, 25, -100, 25);
- ctx.fill();
- @assert pixel 25,12 == 0,255,0,255;
- @assert pixel 75,12 == 0,255,0,255;
- @assert pixel 25,37 == 0,255,0,255;
- @assert pixel 75,37 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.rect.selfintersect
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 90;
- ctx.beginPath();
- ctx.rect(45, 20, 10, 10);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.rect.nonfinite
- desc: rect() with Infinity/NaN is ignored
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.rect(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.newsubpath
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.moveTo(-100, 25);
- ctx.lineTo(-50, 25);
- ctx.roundRect(200, 25, 1, 1, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.closed
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 200;
- ctx.lineJoin = 'miter';
- ctx.roundRect(100, 50, 100, 100, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.end.1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.roundRect(200, 100, 400, 1000, [0]);
- ctx.lineTo(-2000, -1000);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.end.2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 450;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'bevel';
- ctx.roundRect(150, 150, 2000, 2000, [0]);
- ctx.lineTo(160, 160);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.end.3
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.roundRect(101, 51, 2000, 2000, [500, 500, 500, 500]);
- ctx.lineTo(-1, -1);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.end.4
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 10;
- ctx.roundRect(-1, -1, 2000, 2000, [1000, 1000, 1000, 1000]);
- ctx.lineTo(-150, -150);
- ctx.stroke();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.roundRect(0, 50, 100, 0, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.roundRect(50, -100, 0, 250, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.3
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.beginPath();
- ctx.roundRect(50, 25, 0, 0, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.4
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 50;
- ctx.roundRect(100, 25, 0, 0, [0]);
- ctx.lineTo(0, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.5
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.moveTo(0, 0);
- ctx.roundRect(100, 25, 0, 0, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.zero.6
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 1.5;
- ctx.lineWidth = 200;
- ctx.beginPath();
- ctx.roundRect(100, 25, 1000, 0, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.negative
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.fillStyle = '#0f0';
- ctx.roundRect(0, 0, 50, 25, [10, 0, 0, 0]);
- ctx.roundRect(100, 0, -50, 25, [10, 0, 0, 0]);
- ctx.roundRect(0, 50, 50, -25, [10, 0, 0, 0]);
- ctx.roundRect(100, 50, -50, -25, [10, 0, 0, 0]);
- ctx.fill();
- // All rects drawn
- @assert pixel 25,12 == 0,255,0,255;
- @assert pixel 75,12 == 0,255,0,255;
- @assert pixel 25,37 == 0,255,0,255;
- @assert pixel 75,37 == 0,255,0,255;
- // Correct corners are rounded.
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.winding
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.fillStyle = '#f00';
- ctx.roundRect(0, 0, 50, 50, [0]);
- ctx.roundRect(100, 50, -50, -50, [0]);
- ctx.roundRect(0, 25, 100, -25, [0]);
- ctx.roundRect(100, 25, -100, 25, [0]);
- ctx.fill();
- @assert pixel 25,12 == 0,255,0,255;
- @assert pixel 75,12 == 0,255,0,255;
- @assert pixel 25,37 == 0,255,0,255;
- @assert pixel 75,37 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.selfintersect
- code: |
- ctx.fillStyle = '#f00';
- ctx.roundRect(0, 0, 100, 50, [0]);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 90;
- ctx.beginPath();
- ctx.roundRect(45, 20, 10, 10, [0]);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.nonfinite
- desc: roundRect() with Infinity/NaN is ignored
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50)
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- @nonfinite ctx.roundRect(<0 Infinity -Infinity NaN>, <50 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <1 Infinity -Infinity NaN>, <[0] [Infinity] [-Infinity] [NaN] [Infinity,0] [-Infinity,0] [NaN,0] [0,Infinity] [0,-Infinity] [0,NaN] [Infinity,0,0] [-Infinity,0,0] [NaN,0,0] [0,Infinity,0] [0,-Infinity,0] [0,NaN,0] [0,0,Infinity] [0,0,-Infinity] [0,0,NaN] [Infinity,0,0,0] [-Infinity,0,0,0] [NaN,0,0,0] [0,Infinity,0,0] [0,-Infinity,0,0] [0,NaN,0,0] [0,0,Infinity,0] [0,0,-Infinity,0] [0,0,NaN,0] [0,0,0,Infinity] [0,0,0,-Infinity] [0,0,0,NaN]>);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, Infinity)]);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, -Infinity)]);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(10, NaN)]);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(Infinity, 10)]);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(-Infinity, 10)]);
- ctx.roundRect(0, 0, 100, 100, [new DOMPoint(NaN, 10)]);
- ctx.roundRect(0, 0, 100, 100, [{x: 10, y: Infinity}]);
- ctx.roundRect(0, 0, 100, 100, [{x: 10, y: -Infinity}]);
- ctx.roundRect(0, 0, 100, 100, [{x: 10, y: NaN}]);
- ctx.roundRect(0, 0, 100, 100, [{x: Infinity, y: 10}]);
- ctx.roundRect(0, 0, 100, 100, [{x: -Infinity, y: 10}]);
- ctx.roundRect(0, 0, 100, 100, [{x: NaN, y: 10}]);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 90,45 == 0,255,0,255;
- t.done();
- expected: green
-
-- name: 2d.path.roundrect.4.radii.1.double
- desc: Verify that when four radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [20, 0, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.1.dompoint
- desc: Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.1.dompointinit
- desc: Verify that when four radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.2.double
- desc: Verify that when four radii are given to roundRect(), the second radius, specified as a double, applies to the top-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 20, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.2.dompoint
- desc: Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.2.dompointinit
- desc: Verify that when four radii are given to roundRect(), the second radius, specified as a DOMPointInit, applies to the top-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.3.double
- desc: Verify that when four radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, 20, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.3.dompoint
- desc: Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20), 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.3.dompointinit
- desc: Verify that when four radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.4.double
- desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a double, applies to the bottom-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 20]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.4.dompoint
- desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPoint, applies to the bottom-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, 0, new DOMPoint(40, 20)]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.4.radii.4.dompointinit
- desc: Verify that when four radii are given to roundRect(), the fourth radius, specified as a DOMPointInit, applies to the bottom-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, 0, {x: 40, y: 20}]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.1.double
- desc: Verify that when three radii are given to roundRect(), the first radius, specified as a double, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [20, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.1.dompoint
- desc: Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.1.dompointinit
- desc: Verify that when three radii are given to roundRect(), the first radius, specified as a DOMPointInit, applies to the top-left corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.2.double
- desc: Verify that when three radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 20, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.2.dompoint
- desc: Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20), 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.2.dompointinit
- desc: Verify that when three radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.3.double
- desc: Verify that when three radii are given to roundRect(), the third radius, specified as a double, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, 20]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.3.dompoint
- desc: Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPoint, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, new DOMPoint(40, 20)]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.3.radii.3.dompointinit
- desc: Verify that when three radii are given to roundRect(), the third radius, specified as a DOMPointInit, applies to the bottom-right corner.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 0, {x: 40, y: 20}]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.1.double
- desc: Verify that when two radii are given to roundRect(), the first radius, specified as a double, applies to the top-left and bottom-right corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [20, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.1.dompoint
- desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-right corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20), 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.1.dompointinit
- desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-right corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}, 0]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 98,1 == 0,255,0,255;
- @assert pixel 1,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.2.double
- desc: Verify that when two radii are given to roundRect(), the second radius, specified as a double, applies to the top-right and bottom-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, 20]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.2.dompoint
- desc: Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottom-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, new DOMPoint(40, 20)]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.2.radii.2.dompointinit
- desc: Verify that when two radii are given to roundRect(), the second radius, specified as a DOMPoint, applies to the top-right and bottomInit-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [0, {x: 40, y: 20}]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
-
- // other corners
- @assert pixel 1,1 == 0,255,0,255;
- @assert pixel 98,48 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.1.radius.double
- desc: Verify that when one radius is given to roundRect(), specified as a double, it applies to all corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [20]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.1.radius.dompoint
- desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottom-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [new DOMPoint(40, 20)]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.1.radius.dompointinit
- desc: Verify that when two radii are given to roundRect(), the first radius, specified as a DOMPoint, applies to the top-left and bottomInit-left corners.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [{x: 40, y: 20}]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
-
- // top-left corner
- @assert pixel 20,1 == 255,0,0,255;
- @assert pixel 41,1 == 0,255,0,255;
- @assert pixel 1,10 == 255,0,0,255;
- @assert pixel 1,21 == 0,255,0,255;
-
- // top-right corner
- @assert pixel 79,1 == 255,0,0,255;
- @assert pixel 58,1 == 0,255,0,255;
- @assert pixel 98,10 == 255,0,0,255;
- @assert pixel 98,21 == 0,255,0,255;
-
- // bottom-right corner
- @assert pixel 79,48 == 255,0,0,255;
- @assert pixel 58,48 == 0,255,0,255;
- @assert pixel 98,39 == 255,0,0,255;
- @assert pixel 98,28 == 0,255,0,255;
-
- // bottom-left corner
- @assert pixel 20,48 == 255,0,0,255;
- @assert pixel 41,48 == 0,255,0,255;
- @assert pixel 1,39 == 255,0,0,255;
- @assert pixel 1,28 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.roundrect.radius.intersecting.1
- desc: Check that roundRects with intersecting corner arcs are rendered correctly.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [40, 40, 40, 40]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 2,25 == 0,255,0,255;
- @assert pixel 50,1 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 50,48 == 0,255,0,255;
- @assert pixel 97,25 == 0,255,0,255;
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.radius.intersecting.2
- desc: Check that roundRects with intersecting corner arcs are rendered correctly.
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.roundRect(0, 0, 100, 50, [1000, 1000, 1000, 1000]);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 2,25 == 0,255,0,255;
- @assert pixel 50,1 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 50,48 == 0,255,0,255;
- @assert pixel 97,25 == 0,255,0,255;
- @assert pixel 1,1 == 255,0,0,255;
- @assert pixel 98,1 == 255,0,0,255;
- @assert pixel 1,48 == 255,0,0,255;
- @assert pixel 98,48 == 255,0,0,255;
- t.done();
-
-- name: 2d.path.roundrect.radius.none
- desc: Check that roundRect throws an RangeError if radii is an empty array.
- code: |
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [])});
- t.done();
-
-- name: 2d.path.roundrect.radius.toomany
- desc: Check that roundRect throws an IndeSizeError if radii has more than four items.
- code: |
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 100, 50, [0, 0, 0, 0, 0])});
- t.done();
-
-- name: 2d.path.roundrect.radius.negative
- desc: roundRect() with negative radius throws an exception
- code: |
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [-1])});
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [1, -1])});
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(-1, 1), 1])});
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [new DOMPoint(1, -1)])});
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: -1, y: 1}, 1])});
- assert_throws_js(RangeError, () => { ctx.roundRect(0, 0, 0, 0, [{x: 1, y: -1}])});
- t.done();
-
-- name: 2d.path.fill.overlap
- code: |
- ctx.fillStyle = '#000';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = 'rgba(0, 255, 0, 0.5)';
- ctx.rect(0, 0, 100, 50);
- ctx.closePath();
- ctx.rect(10, 10, 80, 30);
- ctx.fill();
- @assert pixel 50,25 ==~ 0,127,0,255 +/- 1;
- t.done();
-
-- name: 2d.path.fill.winding.add
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.lineTo(-10, -10);
- ctx.lineTo(0, 0);
- ctx.lineTo(100, 0);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.fill.winding.subtract.1
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.lineTo(-10, -10);
- ctx.lineTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.fill.winding.subtract.2
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.moveTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.fill.winding.subtract.3
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.lineTo(-10, -10);
- ctx.lineTo(-20, -20);
- ctx.lineTo(120, -20);
- ctx.lineTo(120, 70);
- ctx.lineTo(-20, 70);
- ctx.lineTo(-20, -20);
- ctx.lineTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.fill.closed.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- ctx.lineTo(100, 50);
- ctx.lineTo(0, 50);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.fill.closed.unaffected
- code: |
- ctx.fillStyle = '#00f';
- ctx.fillRect(0, 0, 100, 50);
- ctx.moveTo(0, 0);
- ctx.lineTo(100, 0);
- ctx.lineTo(100, 50);
- ctx.fillStyle = '#f00';
- ctx.fill();
- ctx.lineTo(0, 50);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 90,10 == 0,255,0,255;
- @assert pixel 10,40 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.overlap
- desc: Stroked subpaths are combined before being drawn
- code: |
- ctx.fillStyle = '#000';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = 'rgba(0, 255, 0, 0.5)';
- ctx.lineWidth = 50;
- ctx.moveTo(0, 20);
- ctx.lineTo(100, 20);
- ctx.moveTo(0, 30);
- ctx.lineTo(100, 30);
- ctx.stroke();
- @assert pixel 50,25 ==~ 0,127,0,255 +/- 1;
- t.done();
-
-- name: 2d.path.stroke.union
- desc: Strokes in opposite directions are unioned, not subtracted
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#0f0';
- ctx.lineWidth = 40;
- ctx.moveTo(0, 10);
- ctx.lineTo(100, 10);
- ctx.moveTo(100, 40);
- ctx.lineTo(0, 40);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.unaffected
- desc: Stroking does not start a new path or subpath
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.lineWidth = 50;
- ctx.moveTo(-100, 25);
- ctx.lineTo(-100, -100);
- ctx.lineTo(200, -100);
- ctx.lineTo(200, 25);
- ctx.strokeStyle = '#f00';
- ctx.stroke();
- ctx.closePath();
- ctx.strokeStyle = '#0f0';
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.scale1
- desc: Stroke line widths are scaled by the current transformation matrix
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.rect(25, 12.5, 50, 25);
- ctx.save();
- ctx.scale(50, 25);
- ctx.strokeStyle = '#0f0';
- ctx.stroke();
- ctx.restore();
- ctx.beginPath();
- ctx.rect(-25, -12.5, 150, 75);
- ctx.save();
- ctx.scale(50, 25);
- ctx.strokeStyle = '#f00';
- ctx.stroke();
- ctx.restore();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.scale2
- desc: Stroke line widths are scaled by the current transformation matrix
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.rect(25, 12.5, 50, 25);
- ctx.save();
- ctx.rotate(Math.PI/2);
- ctx.scale(25, 50);
- ctx.strokeStyle = '#0f0';
- ctx.stroke();
- ctx.restore();
- ctx.beginPath();
- ctx.rect(-25, -12.5, 150, 75);
- ctx.save();
- ctx.rotate(Math.PI/2);
- ctx.scale(25, 50);
- ctx.strokeStyle = '#f00';
- ctx.stroke();
- ctx.restore();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.skew
- desc: Strokes lines are skewed by the current transformation matrix
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.save();
- ctx.beginPath();
- ctx.moveTo(49, -50);
- ctx.lineTo(201, -50);
- ctx.rotate(Math.PI/4);
- ctx.scale(1, 283);
- ctx.strokeStyle = '#0f0';
- ctx.stroke();
- ctx.restore();
- ctx.save();
- ctx.beginPath();
- ctx.translate(-150, 0);
- ctx.moveTo(49, -50);
- ctx.lineTo(199, -50);
- ctx.rotate(Math.PI/4);
- ctx.scale(1, 142);
- ctx.strokeStyle = '#f00';
- ctx.stroke();
- ctx.restore();
- ctx.save();
- ctx.beginPath();
- ctx.translate(-150, 0);
- ctx.moveTo(49, -50);
- ctx.lineTo(199, -50);
- ctx.rotate(Math.PI/4);
- ctx.scale(1, 142);
- ctx.strokeStyle = '#f00';
- ctx.stroke();
- ctx.restore();
- @assert pixel 0,0 == 0,255,0,255;
- @assert pixel 50,0 == 0,255,0,255;
- @assert pixel 99,0 == 0,255,0,255;
- @assert pixel 0,25 == 0,255,0,255;
- @assert pixel 50,25 == 0,255,0,255;
- @assert pixel 99,25 == 0,255,0,255;
- @assert pixel 0,49 == 0,255,0,255;
- @assert pixel 50,49 == 0,255,0,255;
- @assert pixel 99,49 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.empty
- desc: Empty subpaths are not stroked
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.moveTo(40, 25);
- ctx.moveTo(60, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.stroke.prune.line
- desc: Zero-length line segments from lineTo are removed before stroking
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.lineTo(50, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.stroke.prune.closed
- desc: Zero-length line segments from closed paths are removed before stroking
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.lineTo(50, 25);
- ctx.closePath();
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.stroke.prune.curve
- desc: Zero-length line segments from quadraticCurveTo and bezierCurveTo are removed
- before stroking
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.quadraticCurveTo(50, 25, 50, 25);
- ctx.stroke();
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.bezierCurveTo(50, 25, 50, 25, 50, 25);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.stroke.prune.arc
- desc: Zero-length line segments from arcTo and arc are removed before stroking
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.moveTo(50, 25);
- ctx.arcTo(50, 25, 150, 25, 10);
- ctx.stroke();
- ctx.beginPath();
- ctx.moveTo(60, 25);
- ctx.arc(50, 25, 10, 0, 0, false);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.stroke.prune.rect
- desc: Zero-length line segments from rect and strokeRect are removed before stroking
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 100;
- ctx.lineCap = 'round';
- ctx.lineJoin = 'round';
- ctx.beginPath();
- ctx.rect(50, 25, 0, 0);
- ctx.stroke();
- ctx.strokeRect(50, 25, 0, 0);
- @assert pixel 50,25 == 0,255,0,255; @moz-todo
- t.done();
-
-- name: 2d.path.stroke.prune.corner
- desc: Zero-length line segments are removed before stroking with miters
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 400;
- ctx.lineJoin = 'miter';
- ctx.miterLimit = 1.4;
- ctx.beginPath();
- ctx.moveTo(-1000, 200);
- ctx.lineTo(-100, 200);
- ctx.lineTo(-100, 200);
- ctx.lineTo(-100, 200);
- ctx.lineTo(-100, 1000);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.transformation.basic
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.translate(-100, 0);
- ctx.rect(100, 0, 100, 50);
- ctx.translate(0, -100);
- ctx.fillStyle = '#0f0';
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.transformation.multiple
- desc: Transformations are applied while building paths, not when drawing
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#f00';
- ctx.translate(-100, 0);
- ctx.rect(0, 0, 100, 50);
- ctx.fill();
- ctx.translate(100, 0);
- ctx.fill();
- ctx.beginPath();
- ctx.strokeStyle = '#f00';
- ctx.lineWidth = 50;
- ctx.translate(0, -50);
- ctx.moveTo(0, 25);
- ctx.lineTo(100, 25);
- ctx.stroke();
- ctx.translate(0, 50);
- ctx.stroke();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.transformation.changing
- desc: Transformations are applied while building paths, not when drawing
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.moveTo(0, 0);
- ctx.translate(100, 0);
- ctx.lineTo(0, 0);
- ctx.translate(0, 50);
- ctx.lineTo(0, 0);
- ctx.translate(-100, 0);
- ctx.lineTo(0, 0);
- ctx.translate(1000, 1000);
- ctx.rotate(Math.PI/2);
- ctx.scale(0.1, 0.1);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.empty
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.clip();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.basic.1
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.rect(0, 0, 100, 50);
- ctx.clip();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.basic.2
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.rect(-100, 0, 100, 50);
- ctx.clip();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.intersect
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.rect(0, 0, 50, 50);
- ctx.clip();
- ctx.beginPath();
- ctx.rect(50, 0, 50, 50)
- ctx.clip();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.winding.1
- code: |
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.lineTo(-10, -10);
- ctx.lineTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.clip();
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.winding.2
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.beginPath();
- ctx.moveTo(-10, -10);
- ctx.lineTo(110, -10);
- ctx.lineTo(110, 60);
- ctx.lineTo(-10, 60);
- ctx.lineTo(-10, -10);
- ctx.clip();
- ctx.beginPath();
- ctx.moveTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.lineTo(0, 0);
- ctx.clip();
- ctx.fillStyle = '#0f0';
- ctx.fillRect(0, 0, 100, 50);
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.clip.unaffected
- code: |
- ctx.fillStyle = '#f00';
- ctx.fillRect(0, 0, 100, 50);
- ctx.fillStyle = '#0f0';
- ctx.beginPath();
- ctx.moveTo(0, 0);
- ctx.lineTo(0, 50);
- ctx.lineTo(100, 50);
- ctx.lineTo(100, 0);
- ctx.clip();
- ctx.lineTo(0, 0);
- ctx.fill();
- @assert pixel 50,25 == 0,255,0,255;
- t.done();
-
-- name: 2d.path.isPointInPath.basic.1
- desc: isPointInPath() detects whether the point is inside the path
- code: |
- ctx.rect(0, 0, 20, 20);
- @assert ctx.isPointInPath(10, 10) === true;
- @assert ctx.isPointInPath(30, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.basic.2
- desc: isPointInPath() detects whether the point is inside the path
- code: |
- ctx.rect(20, 0, 20, 20);
- @assert ctx.isPointInPath(10, 10) === false;
- @assert ctx.isPointInPath(30, 10) === true;
- t.done();
-
-- name: 2d.path.isPointInPath.edge
- desc: isPointInPath() counts points on the path as being inside
- code: |
- ctx.rect(0, 0, 20, 20);
- @assert ctx.isPointInPath(0, 0) === true;
- @assert ctx.isPointInPath(10, 0) === true;
- @assert ctx.isPointInPath(20, 0) === true;
- @assert ctx.isPointInPath(20, 10) === true;
- @assert ctx.isPointInPath(20, 20) === true;
- @assert ctx.isPointInPath(10, 20) === true;
- @assert ctx.isPointInPath(0, 20) === true;
- @assert ctx.isPointInPath(0, 10) === true;
- @assert ctx.isPointInPath(10, -0.01) === false;
- @assert ctx.isPointInPath(10, 20.01) === false;
- @assert ctx.isPointInPath(-0.01, 10) === false;
- @assert ctx.isPointInPath(20.01, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.empty
- desc: isPointInPath() works when there is no path
- code: |
- @assert ctx.isPointInPath(0, 0) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.subpath
- desc: isPointInPath() uses the current path, not just the subpath
- code: |
- ctx.rect(0, 0, 20, 20);
- ctx.beginPath();
- ctx.rect(20, 0, 20, 20);
- ctx.closePath();
- ctx.rect(40, 0, 20, 20);
- @assert ctx.isPointInPath(10, 10) === false;
- @assert ctx.isPointInPath(30, 10) === true;
- @assert ctx.isPointInPath(50, 10) === true;
- t.done();
-
-- name: 2d.path.isPointInPath.outside
- desc: isPointInPath() works on paths outside the canvas
- code: |
- ctx.rect(0, -100, 20, 20);
- ctx.rect(20, -10, 20, 20);
- @assert ctx.isPointInPath(10, -110) === false;
- @assert ctx.isPointInPath(10, -90) === true;
- @assert ctx.isPointInPath(10, -70) === false;
- @assert ctx.isPointInPath(30, -20) === false;
- @assert ctx.isPointInPath(30, 0) === true;
- @assert ctx.isPointInPath(30, 20) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.unclosed
- desc: isPointInPath() works on unclosed subpaths
- code: |
- ctx.moveTo(0, 0);
- ctx.lineTo(20, 0);
- ctx.lineTo(20, 20);
- ctx.lineTo(0, 20);
- @assert ctx.isPointInPath(10, 10) === true;
- @assert ctx.isPointInPath(30, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.arc
- desc: isPointInPath() works on arcs
- code: |
- ctx.arc(50, 25, 10, 0, Math.PI, false);
- @assert ctx.isPointInPath(50, 10) === false;
- @assert ctx.isPointInPath(50, 20) === false;
- @assert ctx.isPointInPath(50, 30) === true;
- @assert ctx.isPointInPath(50, 40) === false;
- @assert ctx.isPointInPath(30, 20) === false;
- @assert ctx.isPointInPath(70, 20) === false;
- @assert ctx.isPointInPath(30, 30) === false;
- @assert ctx.isPointInPath(70, 30) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.bigarc
- desc: isPointInPath() works on unclosed arcs larger than 2pi
- opera: {bug: 320937}
- code: |
- ctx.arc(50, 25, 10, 0, 7, false);
- @assert ctx.isPointInPath(50, 10) === false;
- @assert ctx.isPointInPath(50, 20) === true;
- @assert ctx.isPointInPath(50, 30) === true;
- @assert ctx.isPointInPath(50, 40) === false;
- @assert ctx.isPointInPath(30, 20) === false;
- @assert ctx.isPointInPath(70, 20) === false;
- @assert ctx.isPointInPath(30, 30) === false;
- @assert ctx.isPointInPath(70, 30) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.bezier
- desc: isPointInPath() works on Bezier curves
- code: |
- ctx.moveTo(25, 25);
- ctx.bezierCurveTo(50, -50, 50, 100, 75, 25);
- @assert ctx.isPointInPath(25, 20) === false;
- @assert ctx.isPointInPath(25, 30) === false;
- @assert ctx.isPointInPath(30, 20) === true;
- @assert ctx.isPointInPath(30, 30) === false;
- @assert ctx.isPointInPath(40, 2) === false;
- @assert ctx.isPointInPath(40, 20) === true;
- @assert ctx.isPointInPath(40, 30) === false;
- @assert ctx.isPointInPath(40, 47) === false;
- @assert ctx.isPointInPath(45, 20) === true;
- @assert ctx.isPointInPath(45, 30) === false;
- @assert ctx.isPointInPath(55, 20) === false;
- @assert ctx.isPointInPath(55, 30) === true;
- @assert ctx.isPointInPath(60, 2) === false;
- @assert ctx.isPointInPath(60, 20) === false;
- @assert ctx.isPointInPath(60, 30) === true;
- @assert ctx.isPointInPath(60, 47) === false;
- @assert ctx.isPointInPath(70, 20) === false;
- @assert ctx.isPointInPath(70, 30) === true;
- @assert ctx.isPointInPath(75, 20) === false;
- @assert ctx.isPointInPath(75, 30) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.winding
- desc: isPointInPath() uses the non-zero winding number rule
- code: |
- // Create a square ring, using opposite windings to make a hole in the centre
- ctx.moveTo(0, 0);
- ctx.lineTo(50, 0);
- ctx.lineTo(50, 50);
- ctx.lineTo(0, 50);
- ctx.lineTo(0, 0);
- ctx.lineTo(10, 10);
- ctx.lineTo(10, 40);
- ctx.lineTo(40, 40);
- ctx.lineTo(40, 10);
- ctx.lineTo(10, 10);
- @assert ctx.isPointInPath(5, 5) === true;
- @assert ctx.isPointInPath(25, 5) === true;
- @assert ctx.isPointInPath(45, 5) === true;
- @assert ctx.isPointInPath(5, 25) === true;
- @assert ctx.isPointInPath(25, 25) === false;
- @assert ctx.isPointInPath(45, 25) === true;
- @assert ctx.isPointInPath(5, 45) === true;
- @assert ctx.isPointInPath(25, 45) === true;
- @assert ctx.isPointInPath(45, 45) === true;
- t.done();
-
-- name: 2d.path.isPointInPath.transform.1
- desc: isPointInPath() handles transformations correctly
- code: |
- ctx.translate(50, 0);
- ctx.rect(0, 0, 20, 20);
- @assert ctx.isPointInPath(-40, 10) === false;
- @assert ctx.isPointInPath(10, 10) === false;
- @assert ctx.isPointInPath(49, 10) === false;
- @assert ctx.isPointInPath(51, 10) === true;
- @assert ctx.isPointInPath(69, 10) === true;
- @assert ctx.isPointInPath(71, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.transform.2
- desc: isPointInPath() handles transformations correctly
- code: |
- ctx.rect(50, 0, 20, 20);
- ctx.translate(50, 0);
- @assert ctx.isPointInPath(-40, 10) === false;
- @assert ctx.isPointInPath(10, 10) === false;
- @assert ctx.isPointInPath(49, 10) === false;
- @assert ctx.isPointInPath(51, 10) === true;
- @assert ctx.isPointInPath(69, 10) === true;
- @assert ctx.isPointInPath(71, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.transform.3
- desc: isPointInPath() handles transformations correctly
- code: |
- ctx.scale(-1, 1);
- ctx.rect(-70, 0, 20, 20);
- @assert ctx.isPointInPath(-40, 10) === false;
- @assert ctx.isPointInPath(10, 10) === false;
- @assert ctx.isPointInPath(49, 10) === false;
- @assert ctx.isPointInPath(51, 10) === true;
- @assert ctx.isPointInPath(69, 10) === true;
- @assert ctx.isPointInPath(71, 10) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.transform.4
- desc: isPointInPath() handles transformations correctly
- code: |
- ctx.translate(50, 0);
- ctx.rect(50, 0, 20, 20);
- ctx.translate(0, 50);
- @assert ctx.isPointInPath(60, 10) === false;
- @assert ctx.isPointInPath(110, 10) === true;
- @assert ctx.isPointInPath(110, 60) === false;
- t.done();
-
-- name: 2d.path.isPointInPath.nonfinite
- desc: isPointInPath() returns false for non-finite arguments
- code: |
- ctx.rect(-100, -50, 200, 100);
- @assert ctx.isPointInPath(Infinity, 0) === false;
- @assert ctx.isPointInPath(-Infinity, 0) === false;
- @assert ctx.isPointInPath(NaN, 0) === false;
- @assert ctx.isPointInPath(0, Infinity) === false;
- @assert ctx.isPointInPath(0, -Infinity) === false;
- @assert ctx.isPointInPath(0, NaN) === false;
- @assert ctx.isPointInPath(NaN, NaN) === false;
- t.done();
-
-- name: 2d.path.isPointInStroke.basic
- desc: detects whether point is in the area contained by the stroke of the path
- code: |
- ctx.strokeStyle = '#0f0';
- ctx.beginPath();
- ctx.rect(0, 0, 20, 20);
- @assert ctx.isPointInStroke(0, 0) === true;
- @assert ctx.isPointInStroke(30, 10) === false;
-
- var path = new Path2D();
- path.rect(20, 20, 100, 100);
- @assert ctx.isPointInStroke(path, 20, 20) === true;
- @assert ctx.isPointInStroke(path, 120, 20) === true;
- t.done();
diff --git a/tests/wpt/web-platform-tests/html/embedded-content/the-img-element/attr-img-fetchpriority.html b/tests/wpt/web-platform-tests/html/embedded-content/the-img-element/attr-img-fetchpriority.html
index 996aa4d1567..40daf958705 100644
--- a/tests/wpt/web-platform-tests/html/embedded-content/the-img-element/attr-img-fetchpriority.html
+++ b/tests/wpt/web-platform-tests/html/embedded-content/the-img-element/attr-img-fetchpriority.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>Priority Hints - Image element</title>
+<title>Fetch Priority - Image element</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/input-checkbox-no-centering.html b/tests/wpt/web-platform-tests/html/rendering/widgets/input-checkbox-no-centering.html
new file mode 100644
index 00000000000..7dba149c75f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/widgets/input-checkbox-no-centering.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1441341">
+<link rel="match" href="input-no-centering-ref.html">
+<style>
+input {
+ appearance: none;
+ margin: 0;
+ width: 200px;
+ height: 200px;
+}
+input:before {
+ content: "";
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: green;
+}
+</style>
+<input type="checkbox">
diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/input-no-centering-ref.html b/tests/wpt/web-platform-tests/html/rendering/widgets/input-no-centering-ref.html
new file mode 100644
index 00000000000..5b2ea91fe5f
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/widgets/input-no-centering-ref.html
@@ -0,0 +1,2 @@
+<!DOCTYPE html>
+<div style="width: 100px; height: 100px; background: green;"></div>
diff --git a/tests/wpt/web-platform-tests/html/rendering/widgets/input-radio-no-centering.html b/tests/wpt/web-platform-tests/html/rendering/widgets/input-radio-no-centering.html
new file mode 100644
index 00000000000..6a714f84600
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/rendering/widgets/input-radio-no-centering.html
@@ -0,0 +1,19 @@
+<!DOCTYPE html>
+<link rel="help" href="https://bugs.chromium.org/p/chromium/issues/detail?id=1441341">
+<link rel="match" href="input-no-centering-ref.html">
+<style>
+input {
+ appearance: none;
+ margin: 0;
+ width: 200px;
+ height: 200px;
+}
+input:before {
+ content: "";
+ display: block;
+ width: 100px;
+ height: 100px;
+ background: green;
+}
+</style>
+<input type="radio">
diff --git a/tests/wpt/web-platform-tests/html/scripting/the-script-element/attr-script-fetchpriority.html b/tests/wpt/web-platform-tests/html/scripting/the-script-element/attr-script-fetchpriority.html
index 8639d04d86a..738c9eab747 100644
--- a/tests/wpt/web-platform-tests/html/scripting/the-script-element/attr-script-fetchpriority.html
+++ b/tests/wpt/web-platform-tests/html/scripting/the-script-element/attr-script-fetchpriority.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>Priority Hints - Script element</title>
+<title>Fetch Priority - Script element</title>
<meta name="author" title="Patrick Meenan" href="mailto:patmeenan@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-disabled.tentative.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-disabled.tentative.html
new file mode 100644
index 00000000000..0fe722fdfed
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-disabled.tentative.html
@@ -0,0 +1,28 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+
+<script>
+focused_element_id = null;
+
+function OnFocus(event) {
+ focused_element_id = event.target.id;
+}
+</script>
+
+<selectmenu id="selectmenu" onfocus="OnFocus(event)" disabled>
+ <option>one</option>
+ <option>two</option>
+ <option>three</option>
+</selectmenu>
+
+<script>
+promise_test(async () => {
+ const selectmenu = document.getElementById("selectmenu");
+ selectmenu.focus();
+ assert_equals(focused_element_id, null);
+}, "Check that disabled <selectmenu> cannot be focused");
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html
index 7e572b5418c..830daaabc38 100644
--- a/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html
+++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-events.tentative.html
@@ -41,6 +41,20 @@
<option id="selectMenu4-option2">two</option>
</selectmenu>
+<selectmenu id="selectMenu5WithTabIndex" tabindex="1">
+ <option>one</option>
+ <option>two</option>
+</selectmenu>
+
+<input id="input6"/>
+<selectmenu id="selectMenu7">
+ <button slot="button" behavior="button" id="selectMenu7-button">
+ selectMenu7-button
+ </button>
+ <option>one</option>
+ <option>two</option>
+</selectmenu>
+
<script>
function clickOn(element) {
@@ -79,10 +93,11 @@
// See https://w3c.github.io/webdriver/#keyboard-actions
const KEY_CODE_MAP = {
+ 'Tab': '\uE004',
'Enter': '\uE007',
'Space': '\uE00D',
'ArrowUp': '\uE013',
- 'ArrowDown': '\uE015'
+ 'ArrowDown': '\uE015',
};
promise_test(async () => {
@@ -204,4 +219,39 @@
assert_equals(input_event_count, 1, "input event shouldn't fire when selected option didn't change");
assert_equals(change_event_count, 1, "change event shouldn't fire when selected option didn't change");
}, "<selectmenu> should fire input and change events when option in listbox is clicked");
+
+ promise_test(async() => {
+ const selectMenu = document.getElementById("selectMenu2");
+ await test_driver.send_keys(selectMenu, " ");
+ assert_true(selectMenu.open, "<Space> should open selectmenu");
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.Enter);
+ assert_false(selectMenu.open, "<Enter> should close selectmenu");
+ }, "Check that <Space> opens <selectmenu>.");
+
+ promise_test(async() => {
+ const selectMenu = document.getElementById("selectMenu5WithTabIndex");
+ await test_driver.send_keys(selectMenu, " ");
+ assert_true(selectMenu.open, "<Space> should open selectmenu");
+ await test_driver.send_keys(selectMenu, KEY_CODE_MAP.Enter);
+ assert_false(selectMenu.open, "<Enter> should close selectmenu");
+ }, "Check that <Space> opens <selectmenu> when <selectmenu> specifies tabindex");
+
+ promise_test(async() => {
+ const input6 = document.getElementById("input6");
+ const selectMenu = document.getElementById("selectMenu7");
+ const selectMenuButton = document.getElementById("selectMenu7-button")
+
+ var keydown_count = 0;
+ selectMenuButton.addEventListener("keydown", (e) => {
+ keydown_count++;
+ });
+
+ // Focus selectmenu via Tab traversal because focus() does not work when selectmenu
+ // has custom slot.
+ // TODO(http://crbug.com/1440573) Fix this.
+ await test_driver.send_keys(input6, KEY_CODE_MAP.Tab);
+
+ await test_driver.send_keys(selectMenu, "a");
+ assert_equals(keydown_count, 1, "button in shadowroot should have observed keydown");
+}, "Test that <selectmenu> button slot receives key events.");
</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tab-navigation.tentative.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tab-navigation.tentative.html
new file mode 100644
index 00000000000..3d583335ed1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tab-navigation.tentative.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+
+<input id="input1">
+<selectmenu id="selectmenu">
+ <option>one</option>
+ <option>two</option>
+ <option>three</option>
+</selectmenu>
+<input id="input3">
+
+<script>
+promise_test(async () => {
+ const TAB_KEY = "\uE004";
+
+ const input1 = document.getElementById("input1");
+ const selectmenu = document.getElementById("selectmenu");
+
+ input1.focus();
+ assert_equals(document.activeElement.id, "input1", "input1 should be active");
+
+ await test_driver.send_keys(input1, TAB_KEY);
+ assert_equals(document.activeElement.id, "selectmenu", "selectmenu should be active");
+
+ await test_driver.send_keys(selectmenu, TAB_KEY);
+ assert_equals(document.activeElement.id, "input3", "input3 should be active");
+}, "Check that <selectmenu> occupies just one slot in tab navigation.");
+</script>
+
diff --git a/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tabindex-order.tentative.html b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tabindex-order.tentative.html
new file mode 100644
index 00000000000..b4fa2a1e757
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/forms/the-selectmenu-element/selectmenu-tabindex-order.tentative.html
@@ -0,0 +1,33 @@
+<!DOCTYPE html>
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+
+<input id="input1">
+<selectmenu id="selectmenu" tabindex="2">
+ <option>one</option>
+ <option>two</option>
+ <option>three</option>
+</selectmenu>
+<input id="input3" tabindex="1">
+
+<script>
+promise_test(async () => {
+ const TAB_KEY = "\uE004";
+
+ const input1 = document.getElementById("input1");
+ const input3 = document.getElementById("input3");
+
+ input1.focus();
+ assert_equals(document.activeElement.id, "input1", "input1 should be active");
+
+ await test_driver.send_keys(input1, TAB_KEY);
+ assert_equals(document.activeElement.id, "input3", "input3 should be active");
+
+ await test_driver.send_keys(input3, TAB_KEY);
+ assert_equals(document.activeElement.id, "selectmenu", "selectmenu should be active");
+}, "Check that tabindex applies to <selectmenu>");
+</script>
+
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-all-elements.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-all-elements.html
index 9ee659962b8..5a536f026ee 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-all-elements.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-all-elements.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html
index 335f817e75d..eab61407c8b 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-attribute-basic.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<meta name="timeout" content="long">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -11,11 +11,11 @@
<script src="resources/popover-utils.js"></script>
<div id=popovers>
- <div popover id=boolean>Pop up</div>
- <div popover="">Pop up</div>
- <div popover=auto>Pop up</div>
- <div popover=hint>Pop up</div>
- <div popover=manual>Pop up</div>
+ <div popover id=boolean>Popover</div>
+ <div popover="">Popover</div>
+ <div popover=auto>Popover</div>
+ <div popover=hint>Popover</div>
+ <div popover=manual>Popover</div>
<article popover>Different element type</article>
<header popover>Different element type</header>
<nav popover>Different element type</nav>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-css-properties.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-css-properties.tentative.html
new file mode 100644
index 00000000000..93d388b02b5
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-css-properties.tentative.html
@@ -0,0 +1,54 @@
+<!DOCTYPE html>
+<meta charset="utf-8">
+<title>Popover API CSS parsing with computed values</title>
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/css/support/parsing-testcommon.js"></script>
+<script src="/css/support/computed-testcommon.js"></script>
+<script src="/css/support/interpolation-testcommon.js"></script>
+
+<div id=target></div>
+<div id=scratch></div>
+
+<script>
+function testprop(prop) {
+ // Computed values:
+ test_computed_value(prop, '0s');
+ test_computed_value(prop, '0ms', '0s');
+ test_computed_value(prop, '32s');
+ test_computed_value(prop, '123ms', '0.123s');
+
+ // Valid values:
+ test_valid_value(prop, '0s');
+ test_valid_value(prop, '0ms');
+ test_valid_value(prop, '32s');
+ test_valid_value(prop, '123ms');
+ test_valid_value(prop, 'inherit');
+
+ // Invalid values:
+ test_invalid_value(prop, '0');
+ test_invalid_value(prop, 'foo');
+ test_invalid_value(prop, '-1s');
+ test_invalid_value(prop, 'none');
+ test_invalid_value(prop, 'auto');
+
+ // Animations:
+ test_interpolation({
+ property: prop,
+ from: '1s',
+ to: '2000ms',
+ }, [
+ {at: -1.5, expect: '0s'}, // Clamping at 0
+ {at: -0.3, expect: '0.7s'},
+ {at: 0, expect: '1s'},
+ {at: 0.5, expect: '1.5s'},
+ {at: 1, expect: '2s'},
+ {at: 1.5, expect: '2.5s'},
+ ]);
+}
+
+testprop('popover-show-delay');
+testprop('popover-hide-delay');
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-events.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-events.html
index 4d58001f7dd..eb5b21b15e1 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-events.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-events.html
@@ -86,7 +86,7 @@ window.onload = () => {
assert_equals(0,hideCount);
assert_equals(0,afterShowCount);
assert_equals(0,afterHideCount);
- await waitForRender();
+ await waitForTick();
assert_equals(1,afterShowCount,'toggle show is fired asynchronously');
assert_equals(0,afterHideCount);
assert_true(popover.matches(':popover-open'));
@@ -96,12 +96,12 @@ window.onload = () => {
assert_equals(1,hideCount);
assert_equals(1,afterShowCount);
assert_equals(0,afterHideCount);
- await waitForRender();
+ await waitForTick();
assert_equals(1,afterShowCount);
assert_equals(1,afterHideCount,'toggle hide is fired asynchronously');
// No additional events
- await waitForRender();
- await waitForRender();
+ await waitForTick();
+ await waitForTick();
assert_false(popover.matches(':popover-open'));
assert_equals(1,showCount);
assert_equals(1,hideCount);
@@ -139,8 +139,8 @@ window.onload = () => {
assert_true(popover.matches(':popover-open'));
t.add_cleanup(() => {document.body.appendChild(popover);});
popover.remove();
- await waitForRender(); // Check for async events also
- await waitForRender(); // Check for async events also
+ await waitForTick(); // Check for async events also
+ await waitForTick(); // Check for async events also
assert_false(popover.matches(':popover-open'));
}, 'The "beforetoggle" event is not fired for element removal');
@@ -188,27 +188,27 @@ window.onload = () => {
assertOnly('none');
assert_false(popover.matches(':popover-open'));
popover.showPopover();
- await waitForRender();
+ await waitForTick();
assert_true(popover.matches(':popover-open'));
assertOnly('singleShow','Single event should have been fired, which is a "show"');
resetEvents();
popover.hidePopover();
popover.showPopover(); // Immediate re-show
- await waitForRender();
+ await waitForTick();
assert_true(popover.matches(':popover-open'));
assertOnly('coalescedShow','Single coalesced event should have been fired, which is a "show"');
resetEvents();
popover.hidePopover();
- await waitForRender();
+ await waitForTick();
assertOnly('singleHide','Single event should have been fired, which is a "hide"');
assert_false(popover.matches(':popover-open'));
resetEvents();
popover.showPopover();
popover.hidePopover(); // Immediate re-hide
- await waitForRender();
+ await waitForTick();
assertOnly('coalescedHide','Single coalesced event should have been fired, which is a "hide"');
assert_false(popover.matches(':popover-open'));
}, 'The "toggle" event is coalesced');
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.html
index 5a7f5da8f7b..be6923e604a 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus-2.html
@@ -11,23 +11,23 @@
<script src="resources/popover-utils.js"></script>
<div id=fixup>
- <button id=button1>Button1</button>
+ <button id=button1 tabindex="0">Button1</button>
<div popover id=popover1 style="top:100px">
- <button id=inside_popover1>Inside1</button>
- <button id=invoker2 popovertarget=popover2>Nested Invoker 2</button>
- <button id=inside_popover2>Inside2</button>
+ <button id=inside_popover1 tabindex="0">Inside1</button>
+ <button id=invoker2 popovertarget=popover2 tabindex="0">Nested Invoker 2</button>
+ <button id=inside_popover2 tabindex="0">Inside2</button>
</div>
- <button id=button2>Button2</button>
- <button popovertarget=popover1 id=invoker1>Invoker1</button>
- <button id=button3>Button3</button>
+ <button id=button2 tabindex="0">Button2</button>
+ <button popovertarget=popover1 id=invoker1 tabindex="0">Invoker1</button>
+ <button id=button3 tabindex="0">Button3</button>
<div popover id=popover2 style="top:200px">
- <button id=inside_popover3>Inside3</button>
- <button id=invoker3 popovertarget=popover3>Nested Invoker 3</button>
+ <button id=inside_popover3 tabindex="0">Inside3</button>
+ <button id=invoker3 popovertarget=popover3 tabindex="0">Nested Invoker 3</button>
</div>
<div popover id=popover3 style="top:300px">
Non-focusable popover
</div>
- <button id=button4>Button4</button>
+ <button id=button4 tabindex="0">Button4</button>
</div>
<style>
#fixup [popover] {
@@ -90,11 +90,11 @@ promise_test(async t => {
}, "Popover focus navigation");
</script>
-<button id=circular0 popovertarget=popover4>Invoker</button>
+<button id=circular0 popovertarget=popover4 tabindex="0">Invoker</button>
<div id=popover4 popover>
- <button id=circular1 autofocus popovertarget=popover4 popovertargetaction=hide></button>
- <button id=circular2 popovertarget=popover4 popovertargetaction=show></button>
- <button id=circular3 popovertarget=popover4></button>
+ <button id=circular1 autofocus popovertarget=popover4 popovertargetaction=hide tabindex="0"></button>
+ <button id=circular2 popovertarget=popover4 popovertargetaction=show tabindex="0"></button>
+ <button id=circular3 popovertarget=popover4 tabindex="0"></button>
</div>
<button id=circular4>after</button>
<script>
@@ -107,9 +107,9 @@ promise_test(async t => {
</script>
<div id=focus-return1>
- <button popovertarget=focus-return1-p popovertargetaction=show>Show popover</button>
+ <button popovertarget=focus-return1-p popovertargetaction=show tabindex="0">Show popover</button>
<div popover id=focus-return1-p>
- <button popovertarget=focus-return1-p popovertargetaction=hide autofocus>Hide popover</button>
+ <button popovertarget=focus-return1-p popovertargetaction=hide autofocus tabindex="0">Hide popover</button>
</div>
</div>
<script>
@@ -129,8 +129,8 @@ promise_test(async t => {
</script>
<div id=focus-return2>
- <button popovertarget=focus-return2-p>Toggle popover</button>
- <div popover id=focus-return2-p>Popover with <button>focusable element</button></div>
+ <button popovertarget=focus-return2-p tabindex="0">Toggle popover</button>
+ <div popover id=focus-return2-p>Popover with <button tabindex="0">focusable element</button></div>
<span tabindex=0>Other focusable element</span>
</div>
<script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html
index 915a1bcade3..df7c046e003 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-focus.html
@@ -13,7 +13,7 @@
<div popover data-test='default behavior - popover is not focused' data-no-focus>
<p>This is a popover</p>
- <button>first button</button>
+ <button tabindex="0">first button</button>
</div>
<div popover data-test='autofocus popover' autofocus tabindex=-1 class=should-be-focused>
@@ -24,29 +24,29 @@
<div popover data-test='autofocus popover with button' autofocus tabindex=-1 class=should-be-focused>
<p>This is a popover</p>
- <button>button</button>
+ <button tabindex="0">button</button>
</div>
<div popover data-test='autofocus child'>
<p>This is a popover</p>
- <button autofocus class=should-be-focused>autofocus button</button>
+ <button autofocus class=should-be-focused tabindex="0">autofocus button</button>
</div>
<div popover data-test='autofocus on tabindex=0 element'>
<p autofocus tabindex=0 class=should-be-focused>This is a popover with autofocus on a tabindex=0 element</p>
- <button>button</button>
+ <button tabindex="0">button</button>
</div>
<div popover data-test='autofocus multiple children'>
<p>This is a popover</p>
- <button autofocus class=should-be-focused>autofocus button</button>
- <button autofocus>second autofocus button</button>
+ <button autofocus class=should-be-focused tabindex="0">autofocus button</button>
+ <button autofocus tabindex="0">second autofocus button</button>
</div>
<div popover autofocus tabindex=-1 data-test='autofocus popover and multiple autofocus children' class=should-be-focused>
<p>This is a popover</p>
- <button autofocus>autofocus button</button>
- <button autofocus>second autofocus button</button>
+ <button autofocus tabindex="0">autofocus button</button>
+ <button autofocus tabindex="0">second autofocus button</button>
</div>
<style>
@@ -71,11 +71,13 @@
button.remove();
});
popover.id = popoverId;
+ button.setAttribute('tabindex', '0');
button.setAttribute('popovertarget', popoverId);
return button;
}
function addPriorFocus(t) {
const priorFocus = document.createElement('button');
+ priorFocus.setAttribute("tabindex", "0");
priorFocus.id = 'priorFocus';
document.body.appendChild(priorFocus);
t.add_cleanup(() => priorFocus.remove());
@@ -218,6 +220,7 @@
// Same thing, but the button is unrelated (no popovertarget)
button = document.createElement('button');
+ button.setAttribute("tabindex", "0");
document.body.appendChild(button);
priorFocus.focus();
popover.showPopover();
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hide-crash.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hide-crash.html
new file mode 100644
index 00000000000..3e0c694976c
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hide-crash.html
@@ -0,0 +1,25 @@
+<!DOCTYPE html>
+<html class='reftest-wait'>
+<meta charset='utf-8' />
+<title>Popover hide crash test</title>
+<link rel='author' href="mailto:cathiechen@iglaia.com">
+<link rel=help href="https://github.com/whatwg/html/issues/9197">
+
+<p>This test passes if it does not crash.</p>
+<div id='popover1' popover='auto'>
+ <div id='popover2' popover='auto'></div>
+ <div id='popover3' popover='auto'></div>
+</div>
+
+<script>
+var showedPopover2 = false;
+popover1.showPopover();
+popover3.showPopover();
+popover3.addEventListener('beforetoggle', (e) => {
+ if (e.newState != 'open' && !showedPopover2) {
+ showedPopover2 = true;
+ popover2.showPopover();
+ }
+});
+popover1.hidePopover();
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hover-hide.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hover-hide.tentative.html
new file mode 100644
index 00000000000..ed647a7d7d8
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-hover-hide.tentative.html
@@ -0,0 +1,129 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>The popover-hide-delay CSS property</title>
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
+<meta name="timeout" content="long">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="resources/popover-utils.js"></script>
+
+<style>
+ [popover] {
+ top:100px;
+ popover-hide-delay: 100ms;
+ }
+ [popovertargetaction=hover] {
+ top:200px;
+ popover-show-delay: 100ms;
+ }
+ #unrelated {top: 300px;}
+ div {
+ /* Fixed position everything to ensure nothing overlaps */
+ position: fixed;
+ }
+</style>
+<div id=unrelated>Unrelated element</div>
+
+<div popover id=example1>Popover</div>
+<button popovertarget=example1 popovertargetaction=hover id=invoker1>Hover me</button>
+
+<script>
+const hoverDelays = 100; // This needs to match the style block above.
+const hoverWaitTime = 200; // How long to wait to cover the delay for sure.
+
+// NOTE about testing methodology:
+// This test checks whether popovers are hidden *after* the appropriate de-hover
+// delay. The delay used for testing is kept low, to avoid this test taking too
+// long, but that means that sometimes on a slow bot/client, the delay can
+// elapse before we are able to check the popover status. And that can make this
+// test flaky. To avoid that, the msSinceMouseOver() function is used to check
+// that not-too-much time has passed, and if it has, the test is simply skipped.
+
+const unrelated = document.getElementById('unrelated');
+
+function getComputedStyleTimeMs(element,property) {
+ // Times are in seconds, so just strip off the 's'.
+ return Number(getComputedStyle(element)[property].slice(0,-1))*1000;
+}
+
+promise_test(async (t) => {
+ await mouseOver(unrelated);
+ const popover = document.getElementById('example1');
+ assert_false(popover.matches(':popover-open'));
+ popover.showPopover();
+ assert_true(popover.matches(':popover-open'));
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'));
+ assert_true(msSinceMouseOver() >= hoverWaitTime,'waitForHoverTime should wait the specified time');
+ assert_true(hoverWaitTime > hoverDelays,'hoverDelays is the value from CSS, hoverWaitTime should be longer than that');
+ assert_equals(getComputedStyleTimeMs(invoker1,'popoverShowDelay'),hoverDelays,'popover-show-delay is incorrect');
+ assert_equals(getComputedStyleTimeMs(popover,'popoverHideDelay'),hoverDelays,'popover-hide-delay is incorrect');
+},`The popover-hide-delay causes a popover to be hidden after a delay`);
+
+promise_test(async (t) => {
+ await mouseOver(unrelated);
+ const popover = document.getElementById('example1');
+ assert_false(popover.matches(':popover-open'));
+ popover.showPopover();
+ await mouseOver(popover);
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'hovering the popover should keep it showing');
+ await mouseOver(unrelated);
+ let showing = popover.matches(':popover-open');
+ if (msSinceMouseOver() >= hoverDelays)
+ return; // The WPT runner was too slow.
+ assert_true(showing,'hovering unrelated element shouldn\'t immediately hide the popover');
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'hovering unrelated element should hide popover after delay');
+},`hovering the popover keeps it from being hidden`);
+
+promise_test(async (t) => {
+ await mouseOver(unrelated);
+ const popover = document.getElementById('example1');
+ const invoker = document.getElementById('invoker1');
+ assert_false(popover.matches(':popover-open'));
+ await mouseOver(invoker);
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'));
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'While still hovering the invoker, popover should not be hidden');
+ await mouseOver(popover);
+ await waitForHoverTime(hoverWaitTime);
+ await mouseOver(invoker);
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'Moving hover between invoker and popover should keep popover from being hidden');
+ await mouseOver(unrelated);
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'Moving hover to unrelated should finally hide the popover');
+},`hovering a popovertargetaction=hover invoking element keeps the popover from being hidden`);
+</script>
+
+
+<div popover id=example2>Popover</div>
+<button popovertarget=example2 popovertargetaction=toggle><span><span data-note=nested_element id=invoker2>Click me</span></span></button>
+
+<script>
+promise_test(async (t) => {
+ await mouseOver(unrelated);
+ const popover = document.getElementById('example2');
+ const invoker = document.getElementById('invoker2');
+ assert_equals(getComputedStyleTimeMs(popover,'popoverHideDelay'),hoverDelays,'popover-hide-delay is incorrect');
+ assert_false(popover.matches(':popover-open'));
+ await mouseOver(invoker);
+ popover.showPopover();
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'While hovering an invoker element, popover should not be hidden');
+ await mouseOver(popover);
+ await waitForHoverTime(hoverWaitTime);
+ await mouseOver(invoker);
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'Moving hover between invoker and popover should keep popover from being hidden');
+ await mouseOver(unrelated);
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'Moving hover to unrelated should finally hide the popover');
+},`hovering a popovertargetaction=toggle invoking element keeps the popover from being hidden`);
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html
index 4b1ac6b588f..bfc79fd6291 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-invoker-reset.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<link rel=help href="https://github.com/whatwg/html/issues/9152">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html
index f913aaa357e..4411d0b7e38 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-light-dismiss.html
@@ -3,7 +3,7 @@
<title>Popover light dismiss behavior</title>
<meta name="timeout" content="long">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<script src="/resources/testdriver.js"></script>
@@ -13,7 +13,7 @@
<button id=b1t popovertarget='p1'>Popover 1</button>
<button id=b1s popovertarget='p1' popovertargetaction=show>Popover 1</button>
-<button id=p1anchor>Popover1 anchor (no action)</button>
+<button id=p1anchor tabindex="0">Popover1 anchor (no action)</button>
<span id=outside>Outside all popovers</span>
<div popover id=p1 anchor=p1anchor>
<span id=inside1>Inside popover 1</span>
@@ -23,7 +23,7 @@
<div popover id=p2 anchor=b2>
<span id=inside2>Inside popover 2</span>
</div>
-<button id=after_p1>Next control after popover1</button>
+<button id=after_p1 tabindex="0">Next control after popover1</button>
<style>
#p1 {top: 50px;}
#p2 {top: 120px;}
@@ -332,7 +332,7 @@
<my-element id="myElement">
<template shadowrootmode="open">
- <button id=b7 onclick='showPopover7()'>Popover7</button>
+ <button id=b7 onclick='showPopover7()' tabindex="0">Popover7</button>
<div popover id=p7 anchor=b7 style="top: 100px;">
<p>Popover content.</p>
<input id="inside7" type="text" placeholder="some text">
@@ -364,10 +364,10 @@
</script>
<div popover id=p8 anchor=p8anchor>
- <button>Button</button>
+ <button tabindex="0">Button</button>
<span id=inside8after>Inside popover 8 after button</span>
</div>
-<button id=p8anchor>Popover8 anchor (no action)</button>
+<button id=p8anchor tabindex="0">Popover8 anchor (no action)</button>
<script>
promise_test(async () => {
const popover8 = document.querySelector('#p8');
@@ -398,7 +398,7 @@
<div popover id=convoluted_p3 anchor=convoluted_anchor>Popover 3
<button popovertarget=convoluted_p4>Open Popover 4</button>
</div>
-<button onclick="convoluted_p1.showPopover()">Open convoluted popover</button>
+<button onclick="convoluted_p1.showPopover()" tabindex="0">Open convoluted popover</button>
<style>
#convoluted_p1 {top:50px;}
#convoluted_p2 {top:150px;}
@@ -565,7 +565,7 @@ promise_test(async () => {
<div id=p19 popover>Popover 19</div>
<div id=p20 popover>Popover 20</div>
-<button id=example2>Example 2</button>
+<button id=example2 tabindex="0">Example 2</button>
<script>
promise_test(async () => {
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.html
index 5246073c960..55c70aa643e 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-not-keyboard-focusable.html
@@ -10,11 +10,11 @@
<script src="/resources/testdriver-actions.js"></script>
<script src="/resources/testdriver-vendor.js"></script>
-<button id=firstfocus>Button 1</button>
+<button id=firstfocus tabindex="0">Button 1</button>
<div popover>
<p>This is a popover without a focusable element</p>
</div>
-<button id=secondfocus>Button 2</button>
+<button id=secondfocus tabindex="0">Button 2</button>
<script>
promise_test(async () => {
@@ -34,6 +34,7 @@ promise_test(async () => {
// Add a focusable button to the popover and make sure we can focus that
const button = document.createElement('button');
+ button.setAttribute("tabindex", "0");
popover.appendChild(button);
b1.focus();
popover.showPopover();
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-action-hover.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-action-hover.tentative.html
new file mode 100644
index 00000000000..b03ec78ebf1
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-target-action-hover.tentative.html
@@ -0,0 +1,180 @@
+<!DOCTYPE html>
+<meta charset="utf-8" />
+<title>The popovertargetaction=hover behavior</title>
+<link rel="author" href="mailto:masonf@chromium.org">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
+<meta name="timeout" content="long">
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="/resources/testdriver.js"></script>
+<script src="/resources/testdriver-actions.js"></script>
+<script src="/resources/testdriver-vendor.js"></script>
+<script src="resources/popover-utils.js"></script>
+
+<body>
+<style>
+.unrelated {top:0;}
+.invoker {top:100px; width:fit-content; height:fit-content;}
+[popover] {top: 200px;}
+.offset-child {top:300px; left:300px;}
+</style>
+
+<script>
+const popoverShowDelay = 100; // The CSS delay setting.
+const hoverWaitTime = 200; // How long to wait to cover the delay for sure.
+async function makePopoverAndInvoker(test, popoverType, invokerType, delayMs) {
+ delayMs = delayMs || popoverShowDelay;
+ const popover = Object.assign(document.createElement('div'),{popover: popoverType});
+ document.body.appendChild(popover);
+ popover.textContent = 'Popover';
+ // Set popover-show-delay on the popover to 0 - it should be ignored.
+ popover.setAttribute('style',`popover-show-delay: 0; popover-hide-delay: 1000s;`);
+ let invoker = document.createElement('button');
+ invoker.setAttribute('class','invoker');
+ invoker.popoverTargetElement = popover;
+ invoker.popoverTargetAction = "hover";
+ // Set popover-hide-delay on the invoker to 0 - it should be ignored.
+ invoker.setAttribute('style',`popover-show-delay: ${delayMs}ms; popover-hide-delay: 0;`);
+ document.body.appendChild(invoker);
+ const actualHoverDelay = Number(getComputedStyle(invoker)['popoverShowDelay'].slice(0,-1))*1000;
+ assert_equals(actualHoverDelay,delayMs,'popover-show-delay is incorrect');
+ const originalInvoker = invoker;
+ const reassignPopoverFn = (p) => {originalInvoker.popoverTargetElement = p};
+ switch (invokerType) {
+ case 'plain':
+ // Invoker is just a button.
+ invoker.textContent = 'Invoker';
+ break;
+ case 'nested':
+ // Invoker is just a button containing a div.
+ const child1 = invoker.appendChild(document.createElement('div'));
+ child1.textContent = 'Invoker';
+ break;
+ case 'nested-offset':
+ // Invoker is a child of the invoking button, and is not contained within
+ // the bounds of the popovertarget element.
+ invoker.textContent = 'Invoker';
+ // Reassign invoker to the child:
+ invoker = invoker.appendChild(document.createElement('div'));
+ invoker.textContent = 'Invoker child';
+ invoker.setAttribute('class','offset-child');
+ break;
+ case 'none':
+ // No invoker.
+ invoker.remove();
+ break;
+ default:
+ assert_unreached(`Invalid invokerType ${invokerType}`);
+ }
+ const unrelated = document.createElement('div');
+ document.body.appendChild(unrelated);
+ unrelated.textContent = 'Unrelated';
+ unrelated.setAttribute('class','unrelated');
+ test.add_cleanup(async () => {
+ popover.remove();
+ invoker.remove();
+ originalInvoker.remove();
+ unrelated.remove();
+ await waitForRender();
+ });
+ await mouseOver(unrelated); // Start by mousing over the unrelated element
+ await waitForRender();
+ return {popover,invoker,reassignPopoverFn};
+}
+
+// NOTE about testing methodology:
+// This test checks whether popovers are triggered *after* the appropriate hover
+// delay. The delay used for testing is kept low, to avoid this test taking too
+// long, but that means that sometimes on a slow bot/client, the hover delay can
+// elapse before we are able to check the popover status. And that can make this
+// test flaky. To avoid that, the msSinceMouseOver() function is used to check
+// that not-too-much time has passed, and if it has, the test is simply skipped.
+
+["auto","hint","manual"].forEach(type => {
+ ["plain","nested","nested-offset"].forEach(invokerType => {
+ promise_test(async (t) => {
+ const {popover,invoker} = await makePopoverAndInvoker(t,type,invokerType);
+ assert_false(popover.matches(':popover-open'));
+ await mouseOver(invoker);
+ let showing = popover.matches(':popover-open');
+ // See NOTE above.
+ if (msSinceMouseOver() < popoverShowDelay)
+ assert_false(showing,'popover should not show immediately');
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(msSinceMouseOver() >= hoverWaitTime,'waitForHoverTime should wait the specified time');
+ assert_true(popover.matches(':popover-open'),'popover should show after delay');
+ assert_true(hoverWaitTime > popoverShowDelay,'popoverShowDelay is the CSS setting, hoverWaitTime should be longer than that');
+ popover.hidePopover(); // Cleanup
+ },`popovertargetaction=hover shows a popover with popover=${type}, invokerType=${invokerType}`);
+
+ promise_test(async (t) => {
+ const {popover,invoker} = await makePopoverAndInvoker(t,type,invokerType);
+ assert_false(popover.matches(':popover-open'));
+ invoker.click(); // Click the invoker
+ assert_true(popover.matches(':popover-open'),'Clicking the invoker should show the popover, even when popovertargetaction=hover');
+ popover.hidePopover(); // Cleanup
+ },`popovertargetaction=hover should also allow click activation, for popover=${type}, invokerType=${invokerType}`);
+
+ promise_test(async (t) => {
+ const longerHoverDelay = hoverWaitTime*2;
+ const {popover,invoker} = await makePopoverAndInvoker(t,type,invokerType,longerHoverDelay);
+ await mouseOver(invoker);
+ let showing = popover.matches(':popover-open');
+ // See NOTE above.
+ if (msSinceMouseOver() >= longerHoverDelay)
+ return; // The WPT runner was too slow.
+ assert_false(showing,'popover should not show immediately');
+ await waitForHoverTime(hoverWaitTime);
+ showing = popover.matches(':popover-open');
+ if (msSinceMouseOver() >= longerHoverDelay)
+ return; // The WPT runner was too slow.
+ assert_false(showing,'popover should not show after not long enough of a delay');
+ },`popovertargetaction=hover popover-show-delay is respected (popover=${type}, invokerType=${invokerType})`);
+
+ promise_test(async (t) => {
+ const {popover,invoker} = await makePopoverAndInvoker(t,type,invokerType);
+ popover.showPopover();
+ assert_true(popover.matches(':popover-open'));
+ await mouseOver(invoker);
+ assert_true(popover.matches(':popover-open'),'popover should stay showing on mouseover');
+ await waitForHoverTime(hoverWaitTime);
+ assert_true(popover.matches(':popover-open'),'popover should stay showing after delay');
+ popover.hidePopover(); // Cleanup
+ },`popovertargetaction=hover does nothing when popover is already showing (popover=${type}, invokerType=${invokerType})`);
+
+ promise_test(async (t) => {
+ const {popover,invoker} = await makePopoverAndInvoker(t,type,invokerType);
+ await mouseOver(invoker);
+ let showing = popover.matches(':popover-open');
+ popover.remove();
+ // See NOTE above.
+ if (msSinceMouseOver() >= popoverShowDelay)
+ return; // The WPT runner was too slow.
+ assert_false(showing,'popover should not show immediately');
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'popover should not show even after a delay');
+ // Now put it back in the document and make sure it doesn't trigger.
+ document.body.appendChild(popover);
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'popover should not show even when returned to the document');
+ },`popovertargetaction=hover does nothing when popover is moved out of the document (popover=${type}, invokerType=${invokerType})`);
+
+ promise_test(async (t) => {
+ const {popover,invoker,reassignPopoverFn} = await makePopoverAndInvoker(t,type,invokerType);
+ const popover2 = Object.assign(document.createElement('div'),{popover: type});
+ document.body.appendChild(popover2);
+ t.add_cleanup(() => popover2.remove());
+ await mouseOver(invoker);
+ let eitherShowing = popover.matches(':popover-open') || popover2.matches(':popover-open');
+ reassignPopoverFn(popover2);
+ // See NOTE above.
+ if (msSinceMouseOver() >= popoverShowDelay)
+ return; // The WPT runner was too slow.
+ assert_false(eitherShowing,'popover should not show immediately');
+ await waitForHoverTime(hoverWaitTime);
+ assert_false(popover.matches(':popover-open'),'popover #1 should not show since popovertarget was reassigned');
+ assert_false(popover2.matches(':popover-open'),'popover #2 should not show since popovertarget was reassigned');
+ },`popovertargetaction=hover does nothing when target changes (popover=${type}, invokerType=${invokerType})`);
+ });
+});
+</script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types-with-hints.tentative.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types-with-hints.tentative.html
index 06282a2aa1f..7a73efb50fc 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types-with-hints.tentative.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types-with-hints.tentative.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
@@ -73,7 +73,7 @@
<div popover>popover 3</div>
</div>
</div>
- <div popover=hint anchor=anchorid>Hint anchored to pop-up</div>
+ <div popover=hint anchor=anchorid>Hint anchored to popover</div>
<script>
{
const popover1 = document.currentScript.parentElement.querySelectorAll('[popover=""]')[0];
@@ -116,7 +116,7 @@
assert_false(hint1.matches(':popover-open'));
assert_true(hint2.matches(':popover-open'));
hint2.hidePopover();
- },'If a popover=hint is shown, it should hide any other open popover=hint pop-ups, including ancestral pop-ups. (You can\'t nest popover=hint)');
+ },'If a popover=hint is shown, it should hide any other open popover=hint popovers, including ancestral popovers. (You can\'t nest popover=hint)');
</script>
</div>
@@ -135,7 +135,7 @@
assert_false(hint.matches(':popover-open'));
assert_true(auto.matches(':popover-open'));
auto.hidePopover();
- },'If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral pop-up of the popover=auto. (You can\'t nest a popover=auto inside a popover=hint)');
+ },'If a popover=auto is shown, it should hide any open popover=hint, including if the popover=hint is an ancestral popover of the popover=auto. (You can\'t nest a popover=auto inside a popover=hint)');
</script>
</div>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types.html b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types.html
index e6d7d967bbc..d4ad81e52bf 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types.html
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/popover-types.html
@@ -1,7 +1,7 @@
<!DOCTYPE html>
<meta charset="utf-8">
<link rel="author" href="mailto:masonf@chromium.org">
-<link rel=help href="https://open-ui.org/components/popup.research.explainer">
+<link rel=help href="https://open-ui.org/components/popover.research.explainer">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/semantics/popovers/resources/popover-utils.js b/tests/wpt/web-platform-tests/html/semantics/popovers/resources/popover-utils.js
index ee69ca1e016..39de6aa99b1 100644
--- a/tests/wpt/web-platform-tests/html/semantics/popovers/resources/popover-utils.js
+++ b/tests/wpt/web-platform-tests/html/semantics/popovers/resources/popover-utils.js
@@ -1,6 +1,11 @@
function waitForRender() {
return new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(resolve)));
}
+
+function waitForTick() {
+ return new Promise(resolve => step_timeout(resolve, 0));
+}
+
async function clickOn(element) {
const actions = new test_driver.Actions();
await waitForRender();
diff --git a/tests/wpt/web-platform-tests/html/semantics/the-link-element/attr-link-fetchpriority.html b/tests/wpt/web-platform-tests/html/semantics/the-link-element/attr-link-fetchpriority.html
index 32c318b7605..8aa515fa4c2 100644
--- a/tests/wpt/web-platform-tests/html/semantics/the-link-element/attr-link-fetchpriority.html
+++ b/tests/wpt/web-platform-tests/html/semantics/the-link-element/attr-link-fetchpriority.html
@@ -1,5 +1,5 @@
<!DOCTYPE html>
-<title>Priority Hints - Link element</title>
+<title>Fetch Priority - Link element</title>
<meta name="author" title="Dominic Farolino" href="mailto:domfarolino@gmail.com">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_tables01.html b/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_tables01.html
index a22bfe0b2b2..bcc8a949380 100644
--- a/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_tables01.html
+++ b/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_tables01.html
@@ -18,9 +18,9 @@
<script src="/resources/testharnessreport.js"></script>
<script>
var num_iframes = 8;
- var order = ['86a267778d1960b41f887b7bd2cd3ebf691d2e42','b6c1142484570bb90c36e454ee193cca17bb618a','7c507b825650f9721ea9656b1e844752a2424271','d10316cac9d03820ecfbc85ab373632e12d70c75','331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30','6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f','9d01d4a7d7519e410e10493c8b108298b6733c31','b4615709ab72b6aa6cbf836582bd40fd93c0deb5','24132334bffa9eea4c8e29c940a8201f4253baf5','103784c31b8e3280b19e30f3b26f467585fbc304','0787e31440ae020f6f6e6207c364e9a2daec1c6f','1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c','aea3c063f853938a36184825893e0820b700e241','6595dc192b10c479a543dbe25e67e6e0b6923ea8','9fcd09d757401684bcc28eaec005ed82718e836f','4be18eaaf0aa53f224b4ff8aeaf47d44ba854260','8e743c4f0ab5783b8973533640f669c92acb3797',];
+ var order = ['86a267778d1960b41f887b7bd2cd3ebf691d2e42','b6c1142484570bb90c36e454ee193cca17bb618a','7c507b825650f9721ea9656b1e844752a2424271','d10316cac9d03820ecfbc85ab373632e12d70c75','331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30','6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f','9d01d4a7d7519e410e10493c8b108298b6733c31','b4615709ab72b6aa6cbf836582bd40fd93c0deb5','24132334bffa9eea4c8e29c940a8201f4253baf5','103784c31b8e3280b19e30f3b26f467585fbc304','0787e31440ae020f6f6e6207c364e9a2daec1c6f','1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c','aea3c063f853938a36184825893e0820b700e241','6595dc192b10c479a543dbe25e67e6e0b6923ea8','9fcd09d757401684bcc28eaec005ed82718e836f','4be18eaaf0aa53f224b4ff8aeaf47d44ba854260','8e743c4f0ab5783b8973533640f669c92acb3797','201737ac5662941cdf6ece5d6721ea8b0647f0ce',];
var tests = {
- "86a267778d1960b41f887b7bd2cd3ebf691d2e42":[async_test('html5lib_tables01.html 86a267778d1960b41f887b7bd2cd3ebf691d2e42'), "%3Ctable%3E%3Cth%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cth%3E"],"b6c1142484570bb90c36e454ee193cca17bb618a":[async_test('html5lib_tables01.html b6c1142484570bb90c36e454ee193cca17bb618a'), "%3Ctable%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"7c507b825650f9721ea9656b1e844752a2424271":[async_test('html5lib_tables01.html 7c507b825650f9721ea9656b1e844752a2424271'), "%3Ctable%3E%3Ccol%20foo%3D%27bar%27%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ccolgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ccol%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20foo%3D%22bar%22"],"d10316cac9d03820ecfbc85ab373632e12d70c75":[async_test('html5lib_tables01.html d10316cac9d03820ecfbc85ab373632e12d70c75'), "%3Ctable%3E%3Ccolgroup%3E%3C/html%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ccolgroup%3E"],"331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30":[async_test('html5lib_tables01.html 331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30'), "%3Ctable%3E%3C/table%3E%3Cp%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22"],"6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f":[async_test('html5lib_tables01.html 6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f'), "%3Ctable%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3E%3C/tbody%3E%3C/td%3E%3C/tfoot%3E%3C/th%3E%3C/thead%3E%3C/tr%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"9d01d4a7d7519e410e10493c8b108298b6733c31":[async_test('html5lib_tables01.html 9d01d4a7d7519e410e10493c8b108298b6733c31'), "%3Ctable%3E%3Cselect%3E%3Coption%3E3%3C/select%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%223%22%0A%7C%20%20%20%20%20%3Ctable%3E"],"b4615709ab72b6aa6cbf836582bd40fd93c0deb5":[async_test('html5lib_tables01.html b4615709ab72b6aa6cbf836582bd40fd93c0deb5'), "%3Ctable%3E%3Cselect%3E%3Ctable%3E%3C/table%3E%3C/select%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"24132334bffa9eea4c8e29c940a8201f4253baf5":[async_test('html5lib_tables01.html 24132334bffa9eea4c8e29c940a8201f4253baf5'), "%3Ctable%3E%3Cselect%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"103784c31b8e3280b19e30f3b26f467585fbc304":[async_test('html5lib_tables01.html 103784c31b8e3280b19e30f3b26f467585fbc304'), "%3Ctable%3E%3Cselect%3E%3Coption%3EA%3Ctr%3E%3Ctd%3EB%3C/td%3E%3C/tr%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22B%22"],"0787e31440ae020f6f6e6207c364e9a2daec1c6f":[async_test('html5lib_tables01.html 0787e31440ae020f6f6e6207c364e9a2daec1c6f'), "%3Ctable%3E%3Ctd%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22foo%22"],"1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c":[async_test('html5lib_tables01.html 1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c'), "%3Ctable%3E%3Ctd%3EA%3C/table%3EB", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%22B%22"],"aea3c063f853938a36184825893e0820b700e241":[async_test('html5lib_tables01.html aea3c063f853938a36184825893e0820b700e241'), "%3Ctable%3E%3Ctr%3E%3Ccaption%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%3Ccaption%3E"],"6595dc192b10c479a543dbe25e67e6e0b6923ea8":[async_test('html5lib_tables01.html 6595dc192b10c479a543dbe25e67e6e0b6923ea8'), "%3Ctable%3E%3Ctr%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3E%3C/td%3E%3C/th%3E%3Ctd%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22foo%22"],"9fcd09d757401684bcc28eaec005ed82718e836f":[async_test('html5lib_tables01.html 9fcd09d757401684bcc28eaec005ed82718e836f'), "%3Ctable%3E%3Ctd%3E%3Ctr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E"],"4be18eaaf0aa53f224b4ff8aeaf47d44ba854260":[async_test('html5lib_tables01.html 4be18eaaf0aa53f224b4ff8aeaf47d44ba854260'), "%3Ctable%3E%3Ctd%3E%3Cbutton%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"8e743c4f0ab5783b8973533640f669c92acb3797":[async_test('html5lib_tables01.html 8e743c4f0ab5783b8973533640f669c92acb3797'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Csvg%3E%3Cdesc%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20desc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],
+ "86a267778d1960b41f887b7bd2cd3ebf691d2e42":[async_test('html5lib_tables01.html 86a267778d1960b41f887b7bd2cd3ebf691d2e42'), "%3Ctable%3E%3Cth%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cth%3E"],"b6c1142484570bb90c36e454ee193cca17bb618a":[async_test('html5lib_tables01.html b6c1142484570bb90c36e454ee193cca17bb618a'), "%3Ctable%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"7c507b825650f9721ea9656b1e844752a2424271":[async_test('html5lib_tables01.html 7c507b825650f9721ea9656b1e844752a2424271'), "%3Ctable%3E%3Ccol%20foo%3D%27bar%27%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ccolgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ccol%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20foo%3D%22bar%22"],"d10316cac9d03820ecfbc85ab373632e12d70c75":[async_test('html5lib_tables01.html d10316cac9d03820ecfbc85ab373632e12d70c75'), "%3Ctable%3E%3Ccolgroup%3E%3C/html%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ccolgroup%3E"],"331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30":[async_test('html5lib_tables01.html 331a8c15a2f1dd3a9a1c31f5c65b99d356a65f30'), "%3Ctable%3E%3C/table%3E%3Cp%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20%22foo%22"],"6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f":[async_test('html5lib_tables01.html 6cdb83f12cb37a56f5ebad018ec3b07c2ad5b89f'), "%3Ctable%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3E%3C/tbody%3E%3C/td%3E%3C/tfoot%3E%3C/th%3E%3C/thead%3E%3C/tr%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"9d01d4a7d7519e410e10493c8b108298b6733c31":[async_test('html5lib_tables01.html 9d01d4a7d7519e410e10493c8b108298b6733c31'), "%3Ctable%3E%3Cselect%3E%3Coption%3E3%3C/select%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%223%22%0A%7C%20%20%20%20%20%3Ctable%3E"],"b4615709ab72b6aa6cbf836582bd40fd93c0deb5":[async_test('html5lib_tables01.html b4615709ab72b6aa6cbf836582bd40fd93c0deb5'), "%3Ctable%3E%3Cselect%3E%3Ctable%3E%3C/table%3E%3C/select%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"24132334bffa9eea4c8e29c940a8201f4253baf5":[async_test('html5lib_tables01.html 24132334bffa9eea4c8e29c940a8201f4253baf5'), "%3Ctable%3E%3Cselect%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"103784c31b8e3280b19e30f3b26f467585fbc304":[async_test('html5lib_tables01.html 103784c31b8e3280b19e30f3b26f467585fbc304'), "%3Ctable%3E%3Cselect%3E%3Coption%3EA%3Ctr%3E%3Ctd%3EB%3C/td%3E%3C/tr%3E%3C/table%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22B%22"],"0787e31440ae020f6f6e6207c364e9a2daec1c6f":[async_test('html5lib_tables01.html 0787e31440ae020f6f6e6207c364e9a2daec1c6f'), "%3Ctable%3E%3Ctd%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22foo%22"],"1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c":[async_test('html5lib_tables01.html 1c40461886d4fdfca6ac5ef1d766b6fbf360ff9c'), "%3Ctable%3E%3Ctd%3EA%3C/table%3EB", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%22B%22"],"aea3c063f853938a36184825893e0820b700e241":[async_test('html5lib_tables01.html aea3c063f853938a36184825893e0820b700e241'), "%3Ctable%3E%3Ctr%3E%3Ccaption%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%3Ccaption%3E"],"6595dc192b10c479a543dbe25e67e6e0b6923ea8":[async_test('html5lib_tables01.html 6595dc192b10c479a543dbe25e67e6e0b6923ea8'), "%3Ctable%3E%3Ctr%3E%3C/body%3E%3C/caption%3E%3C/col%3E%3C/colgroup%3E%3C/html%3E%3C/td%3E%3C/th%3E%3Ctd%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22foo%22"],"9fcd09d757401684bcc28eaec005ed82718e836f":[async_test('html5lib_tables01.html 9fcd09d757401684bcc28eaec005ed82718e836f'), "%3Ctable%3E%3Ctd%3E%3Ctr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E"],"4be18eaaf0aa53f224b4ff8aeaf47d44ba854260":[async_test('html5lib_tables01.html 4be18eaaf0aa53f224b4ff8aeaf47d44ba854260'), "%3Ctable%3E%3Ctd%3E%3Cbutton%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cbutton%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"8e743c4f0ab5783b8973533640f669c92acb3797":[async_test('html5lib_tables01.html 8e743c4f0ab5783b8973533640f669c92acb3797'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Csvg%3E%3Cdesc%3E%3Ctd%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Csvg%20desc%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"201737ac5662941cdf6ece5d6721ea8b0647f0ce":[async_test('html5lib_tables01.html 201737ac5662941cdf6ece5d6721ea8b0647f0ce'), "%3Cdiv%3E%3Ctable%3E%3Csvg%3E%3CforeignObject%3E%3Cselect%3E%3Ctable%3E%3Cs%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Cs%3E%0A%7C%20%20%20%20%20%20%20%3Ctable%3E"],
}
init_tests(get_type());
</script>
diff --git a/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html b/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html
index 5c9bf4efc86..51900fa54a2 100644
--- a/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html
+++ b/tests/wpt/web-platform-tests/html/syntax/parsing/html5lib_webkit02.html
@@ -18,9 +18,9 @@
<script src="/resources/testharnessreport.js"></script>
<script>
var num_iframes = 8;
- var order = ['f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6','326328ea805a2ebdde707e08567713f88a4cf8ab','05138397908cfdad69a3bfe5da5a06098320b504','2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9','4a256d7ef602c7c917c758e15981b9710f9b4130','98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4','209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f','cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6','c46a4badc6b1ebc524e6f90ea56183310e93ab25','464eeaecc49646ff810cadad537880c9b473a262','7b4eb6981451ede406f2f4112e83a8584e7adbf5','73aed96d7cd3116e4a3e701104616c07d1ec5e0c','139a546c72bfcedf638d031f33da43f24995f688','6e33515b4dc011dd390d433a6358bf68b786b1fd','b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b','21a5b2b413c4db8ed588334b9a50dea9872bbcfa','90d3f6f2dff994f63293ca46f7cd50a75cde96a6','3e6b37a5fd0b16769f71f8e6a022ef6a972769d0','66c5e72324003827309d3590a9ba56412ba68f79','329d2522353afa12afea478bbfafdb0ff0656572',];
+ var order = ['f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6','326328ea805a2ebdde707e08567713f88a4cf8ab','05138397908cfdad69a3bfe5da5a06098320b504','2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9','4a256d7ef602c7c917c758e15981b9710f9b4130','98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4','209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f','cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6','c46a4badc6b1ebc524e6f90ea56183310e93ab25','464eeaecc49646ff810cadad537880c9b473a262','7b4eb6981451ede406f2f4112e83a8584e7adbf5','73aed96d7cd3116e4a3e701104616c07d1ec5e0c','139a546c72bfcedf638d031f33da43f24995f688','6e33515b4dc011dd390d433a6358bf68b786b1fd','b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b','21a5b2b413c4db8ed588334b9a50dea9872bbcfa','90d3f6f2dff994f63293ca46f7cd50a75cde96a6','3e6b37a5fd0b16769f71f8e6a022ef6a972769d0','66c5e72324003827309d3590a9ba56412ba68f79','329d2522353afa12afea478bbfafdb0ff0656572','5463526d91a8677b27b6967866d6605f1bb03aac','4879f476053094cf5602d325724675378856a902','44c88b90236f01ebc8e0123363b527640a07070c','cfb304e8f2d3cbdecc362226e7775cab452d5489','3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87','ecd089f9b5193fad306c5b475c4711547fe5e209','cee2230c74671c594a1140a68d16e3d3e5ae005a','22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90','a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a','61f8d527795dc8044a95a3e2437de81e16597ceb',];
var tests = {
- "f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6":[async_test('html5lib_webkit02.html f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6'), "%3Cfoo%20bar%3Dqux/%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20bar%3D%22qux/%22"],"326328ea805a2ebdde707e08567713f88a4cf8ab":[async_test('html5lib_webkit02.html 326328ea805a2ebdde707e08567713f88a4cf8ab'), "%3Cp%20id%3D%22status%22%3E%3Cnoscript%3E%3Cstrong%3EA%3C/strong%3E%3C/noscript%3E%3Cspan%3EB%3C/span%3E%3C/p%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20id%3D%22status%22%0A%7C%20%20%20%20%20%20%20%3Cnoscript%3E%0A%7C%20%20%20%20%20%20%20%20%20%22%3Cstrong%3EA%3C/strong%3E%22%0A%7C%20%20%20%20%20%20%20%3Cspan%3E%0A%7C%20%20%20%20%20%20%20%20%20%22B%22"],"05138397908cfdad69a3bfe5da5a06098320b504":[async_test('html5lib_webkit02.html 05138397908cfdad69a3bfe5da5a06098320b504'), "%3Cdiv%3E%3Csarcasm%3E%3Cdiv%3E%3C/div%3E%3C/sarcasm%3E%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Csarcasm%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cdiv%3E"],"2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9":[async_test('html5lib_webkit02.html 2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9'), "%3Chtml%3E%3Cbody%3E%3Cimg%20src%3D%22%22%20border%3D%220%22%20alt%3D%22%3E%3Cdiv%3EA%3C/div%3E%3C/body%3E%3C/html%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E"],"4a256d7ef602c7c917c758e15981b9710f9b4130":[async_test('html5lib_webkit02.html 4a256d7ef602c7c917c758e15981b9710f9b4130'), "%3Ctable%3E%3Ctd%3E%3C/tbody%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4":[async_test('html5lib_webkit02.html 98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4'), "%3Ctable%3E%3Ctd%3E%3C/thead%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f":[async_test('html5lib_webkit02.html 209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f'), "%3Ctable%3E%3Ctd%3E%3C/tfoot%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6":[async_test('html5lib_webkit02.html cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6'), "%3Ctable%3E%3Cthead%3E%3Ctd%3E%3C/tbody%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Cthead%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"c46a4badc6b1ebc524e6f90ea56183310e93ab25":[async_test('html5lib_webkit02.html c46a4badc6b1ebc524e6f90ea56183310e93ab25'), "%3Clegend%3Etest%3C/legend%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Clegend%3E%0A%7C%20%20%20%20%20%20%20%22test%22"],"464eeaecc49646ff810cadad537880c9b473a262":[async_test('html5lib_webkit02.html 464eeaecc49646ff810cadad537880c9b473a262'), "%3Ctable%3E%3Cinput%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cinput%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"7b4eb6981451ede406f2f4112e83a8584e7adbf5":[async_test('html5lib_webkit02.html 7b4eb6981451ede406f2f4112e83a8584e7adbf5'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cb%3E"],"73aed96d7cd3116e4a3e701104616c07d1ec5e0c":[async_test('html5lib_webkit02.html 73aed96d7cd3116e4a3e701104616c07d1ec5e0c'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cb%3E"],"139a546c72bfcedf638d031f33da43f24995f688":[async_test('html5lib_webkit02.html 139a546c72bfcedf638d031f33da43f24995f688'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E"],"6e33515b4dc011dd390d433a6358bf68b786b1fd":[async_test('html5lib_webkit02.html 6e33515b4dc011dd390d433a6358bf68b786b1fd'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E"],"b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b":[async_test('html5lib_webkit02.html b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b'), "%3Csvg%3E%3CforeignObject%3E%3Cdiv%3Efoo%3C/div%3E%3Cplaintext%3E%3C/foreignObject%3E%3C/svg%3E%3Cdiv%3Ebar%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cplaintext%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22%3C/foreignObject%3E%3C/svg%3E%3Cdiv%3Ebar%3C/div%3E%22"],"21a5b2b413c4db8ed588334b9a50dea9872bbcfa":[async_test('html5lib_webkit02.html 21a5b2b413c4db8ed588334b9a50dea9872bbcfa'), "%3Csvg%3E%3CforeignObject%3E%3C/foreignObject%3E%3Ctitle%3E%3C/svg%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20title%3E%0A%7C%20%20%20%20%20%22foo%22"],"90d3f6f2dff994f63293ca46f7cd50a75cde96a6":[async_test('html5lib_webkit02.html 90d3f6f2dff994f63293ca46f7cd50a75cde96a6'), "%3C/foreignObject%3E%3Cplaintext%3E%3Cdiv%3Efoo%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cplaintext%3E%0A%7C%20%20%20%20%20%20%20%22%3Cdiv%3Efoo%3C/div%3E%22"],"3e6b37a5fd0b16769f71f8e6a022ef6a972769d0":[async_test('html5lib_webkit02.html 3e6b37a5fd0b16769f71f8e6a022ef6a972769d0'), "%3Csvg%20xml%3Abase%20xml%3Alang%20xml%3Aspace%20xml%3Abaaah%20definitionurl%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20definitionurl%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%20lang%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%20space%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%3Abaaah%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%3Abase%3D%22%22"],"66c5e72324003827309d3590a9ba56412ba68f79":[async_test('html5lib_webkit02.html 66c5e72324003827309d3590a9ba56412ba68f79'), "%3Cmath%20definitionurl%20xlink%3Atitle%20xlink%3Ashow%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20definitionURL%3D%22%22%0A%7C%20%20%20%20%20%20%20xlink%20show%3D%22%22%0A%7C%20%20%20%20%20%20%20xlink%20title%3D%22%22"],"329d2522353afa12afea478bbfafdb0ff0656572":[async_test('html5lib_webkit02.html 329d2522353afa12afea478bbfafdb0ff0656572'), "%3Cmath%20DEFINITIONURL%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20definitionURL%3D%22%22"],
+ "f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6":[async_test('html5lib_webkit02.html f50b8c15847159a6d2c6ecc2bd1e4a944ba5aae6'), "%3Cfoo%20bar%3Dqux/%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20bar%3D%22qux/%22"],"326328ea805a2ebdde707e08567713f88a4cf8ab":[async_test('html5lib_webkit02.html 326328ea805a2ebdde707e08567713f88a4cf8ab'), "%3Cp%20id%3D%22status%22%3E%3Cnoscript%3E%3Cstrong%3EA%3C/strong%3E%3C/noscript%3E%3Cspan%3EB%3C/span%3E%3C/p%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cp%3E%0A%7C%20%20%20%20%20%20%20id%3D%22status%22%0A%7C%20%20%20%20%20%20%20%3Cnoscript%3E%0A%7C%20%20%20%20%20%20%20%20%20%22%3Cstrong%3EA%3C/strong%3E%22%0A%7C%20%20%20%20%20%20%20%3Cspan%3E%0A%7C%20%20%20%20%20%20%20%20%20%22B%22"],"05138397908cfdad69a3bfe5da5a06098320b504":[async_test('html5lib_webkit02.html 05138397908cfdad69a3bfe5da5a06098320b504'), "%3Cdiv%3E%3Csarcasm%3E%3Cdiv%3E%3C/div%3E%3C/sarcasm%3E%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%3Csarcasm%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cdiv%3E"],"2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9":[async_test('html5lib_webkit02.html 2aaa2ac0d7cec6144633d8f82f3bcaafa7498cd9'), "%3Chtml%3E%3Cbody%3E%3Cimg%20src%3D%22%22%20border%3D%220%22%20alt%3D%22%3E%3Cdiv%3EA%3C/div%3E%3C/body%3E%3C/html%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E"],"4a256d7ef602c7c917c758e15981b9710f9b4130":[async_test('html5lib_webkit02.html 4a256d7ef602c7c917c758e15981b9710f9b4130'), "%3Ctable%3E%3Ctd%3E%3C/tbody%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%22A%22%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E"],"98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4":[async_test('html5lib_webkit02.html 98cea04429ddbe4ffaaa0b91fe77b8c0b1f7c1f4'), "%3Ctable%3E%3Ctd%3E%3C/thead%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f":[async_test('html5lib_webkit02.html 209ad7d6f6c9c53cb856c7d78b2bc4a7f38abd5f'), "%3Ctable%3E%3Ctd%3E%3C/tfoot%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6":[async_test('html5lib_webkit02.html cb9a86fbac96b08a6e708a2dbcd9f78539dfe9c6'), "%3Ctable%3E%3Cthead%3E%3Ctd%3E%3C/tbody%3EA", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Cthead%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%22A%22"],"c46a4badc6b1ebc524e6f90ea56183310e93ab25":[async_test('html5lib_webkit02.html c46a4badc6b1ebc524e6f90ea56183310e93ab25'), "%3Clegend%3Etest%3C/legend%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Clegend%3E%0A%7C%20%20%20%20%20%20%20%22test%22"],"464eeaecc49646ff810cadad537880c9b473a262":[async_test('html5lib_webkit02.html 464eeaecc49646ff810cadad537880c9b473a262'), "%3Ctable%3E%3Cinput%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cinput%3E%0A%7C%20%20%20%20%20%3Ctable%3E"],"7b4eb6981451ede406f2f4112e83a8584e7adbf5":[async_test('html5lib_webkit02.html 7b4eb6981451ede406f2f4112e83a8584e7adbf5'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cb%3E"],"73aed96d7cd3116e4a3e701104616c07d1ec5e0c":[async_test('html5lib_webkit02.html 73aed96d7cd3116e4a3e701104616c07d1ec5e0c'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cb%3E"],"139a546c72bfcedf638d031f33da43f24995f688":[async_test('html5lib_webkit02.html 139a546c72bfcedf638d031f33da43f24995f688'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E"],"6e33515b4dc011dd390d433a6358bf68b786b1fd":[async_test('html5lib_webkit02.html 6e33515b4dc011dd390d433a6358bf68b786b1fd'), "%3Cb%3E%3Cem%3E%3Cfoo%3E%3Cfoo%3E%3Cfoo%3E%3Caside%3E%3C/b%3E%3C/em%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cb%3E%0A%7C%20%20%20%20%20%20%20%3Cem%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cfoo%3E%0A%7C%20%20%20%20%20%3Caside%3E%0A%7C%20%20%20%20%20%20%20%3Cb%3E"],"b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b":[async_test('html5lib_webkit02.html b6d2377b0dd710ca812c97b2b65cb5d2e93b0e5b'), "%3Csvg%3E%3CforeignObject%3E%3Cdiv%3Efoo%3C/div%3E%3Cplaintext%3E%3C/foreignObject%3E%3C/svg%3E%3Cdiv%3Ebar%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Cdiv%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22foo%22%0A%7C%20%20%20%20%20%20%20%20%20%3Cplaintext%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%22%3C/foreignObject%3E%3C/svg%3E%3Cdiv%3Ebar%3C/div%3E%22"],"21a5b2b413c4db8ed588334b9a50dea9872bbcfa":[async_test('html5lib_webkit02.html 21a5b2b413c4db8ed588334b9a50dea9872bbcfa'), "%3Csvg%3E%3CforeignObject%3E%3C/foreignObject%3E%3Ctitle%3E%3C/svg%3Efoo", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20foreignObject%3E%0A%7C%20%20%20%20%20%20%20%3Csvg%20title%3E%0A%7C%20%20%20%20%20%22foo%22"],"90d3f6f2dff994f63293ca46f7cd50a75cde96a6":[async_test('html5lib_webkit02.html 90d3f6f2dff994f63293ca46f7cd50a75cde96a6'), "%3C/foreignObject%3E%3Cplaintext%3E%3Cdiv%3Efoo%3C/div%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cplaintext%3E%0A%7C%20%20%20%20%20%20%20%22%3Cdiv%3Efoo%3C/div%3E%22"],"3e6b37a5fd0b16769f71f8e6a022ef6a972769d0":[async_test('html5lib_webkit02.html 3e6b37a5fd0b16769f71f8e6a022ef6a972769d0'), "%3Csvg%20xml%3Abase%20xml%3Alang%20xml%3Aspace%20xml%3Abaaah%20definitionurl%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Csvg%20svg%3E%0A%7C%20%20%20%20%20%20%20definitionurl%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%20lang%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%20space%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%3Abaaah%3D%22%22%0A%7C%20%20%20%20%20%20%20xml%3Abase%3D%22%22"],"66c5e72324003827309d3590a9ba56412ba68f79":[async_test('html5lib_webkit02.html 66c5e72324003827309d3590a9ba56412ba68f79'), "%3Cmath%20definitionurl%20xlink%3Atitle%20xlink%3Ashow%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20definitionURL%3D%22%22%0A%7C%20%20%20%20%20%20%20xlink%20show%3D%22%22%0A%7C%20%20%20%20%20%20%20xlink%20title%3D%22%22"],"329d2522353afa12afea478bbfafdb0ff0656572":[async_test('html5lib_webkit02.html 329d2522353afa12afea478bbfafdb0ff0656572'), "%3Cmath%20DEFINITIONURL%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cmath%20math%3E%0A%7C%20%20%20%20%20%20%20definitionURL%3D%22%22"],"5463526d91a8677b27b6967866d6605f1bb03aac":[async_test('html5lib_webkit02.html 5463526d91a8677b27b6967866d6605f1bb03aac'), "%3Cselect%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Chr%3E"],"4879f476053094cf5602d325724675378856a902":[async_test('html5lib_webkit02.html 4879f476053094cf5602d325724675378856a902'), "%3Cselect%3E%3Coption%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%3Chr%3E"],"44c88b90236f01ebc8e0123363b527640a07070c":[async_test('html5lib_webkit02.html 44c88b90236f01ebc8e0123363b527640a07070c'), "%3Cselect%3E%3Coptgroup%3E%3Coption%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%3Chr%3E"],"cfb304e8f2d3cbdecc362226e7775cab452d5489":[async_test('html5lib_webkit02.html cfb304e8f2d3cbdecc362226e7775cab452d5489'), "%3Cselect%3E%3Coptgroup%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%3Chr%3E"],"3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87":[async_test('html5lib_webkit02.html 3fc625e7cb9b6ea72a9e252ede84c6fdd9680d87'), "%3Cselect%3E%3Coption%3E%3Coptgroup%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%3Chr%3E"],"ecd089f9b5193fad306c5b475c4711547fe5e209":[async_test('html5lib_webkit02.html ecd089f9b5193fad306c5b475c4711547fe5e209'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cselect%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chr%3E"],"cee2230c74671c594a1140a68d16e3d3e5ae005a":[async_test('html5lib_webkit02.html cee2230c74671c594a1140a68d16e3d3e5ae005a'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cselect%3E%3Coption%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chr%3E"],"22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90":[async_test('html5lib_webkit02.html 22b9fe36797d70a3b71a6aadc6ad7cff23c3fc90'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cselect%3E%3Coptgroup%3E%3Coption%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chr%3E"],"a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a":[async_test('html5lib_webkit02.html a82c3bf49c381b5f58c5c8a4bbbe0cef2458e28a'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cselect%3E%3Coptgroup%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chr%3E"],"61f8d527795dc8044a95a3e2437de81e16597ceb":[async_test('html5lib_webkit02.html 61f8d527795dc8044a95a3e2437de81e16597ceb'), "%3Ctable%3E%3Ctr%3E%3Ctd%3E%3Cselect%3E%3Coption%3E%3Coptgroup%3E%3Chr%3E", "%23document%0A%7C%20%3Chtml%3E%0A%7C%20%20%20%3Chead%3E%0A%7C%20%20%20%3Cbody%3E%0A%7C%20%20%20%20%20%3Ctable%3E%0A%7C%20%20%20%20%20%20%20%3Ctbody%3E%0A%7C%20%20%20%20%20%20%20%20%20%3Ctr%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%3Ctd%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%3Cselect%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coption%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Coptgroup%3E%0A%7C%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%3Chr%3E"],
}
init_tests(get_type());
</script>
diff --git a/tests/wpt/web-platform-tests/html/tools/README b/tests/wpt/web-platform-tests/html/tools/README
new file mode 100644
index 00000000000..2ebde65fcdf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/html/tools/README
@@ -0,0 +1 @@
+See ../syntax/parsing/README.
diff --git a/tests/wpt/web-platform-tests/html/tools/html5lib_tests_revision b/tests/wpt/web-platform-tests/html/tools/html5lib_tests_revision
index dae44a04416..4af32678e53 100644
--- a/tests/wpt/web-platform-tests/html/tools/html5lib_tests_revision
+++ b/tests/wpt/web-platform-tests/html/tools/html5lib_tests_revision
@@ -1 +1 @@
-251b2efff71c914dd184c868fdd70b9d9e54aed4
+c67f90eacac14e022b1f2c2e5ac559879581e9ff
diff --git a/tests/wpt/web-platform-tests/lint.ignore b/tests/wpt/web-platform-tests/lint.ignore
index 6f8ec10470b..7118adb1611 100644
--- a/tests/wpt/web-platform-tests/lint.ignore
+++ b/tests/wpt/web-platform-tests/lint.ignore
@@ -252,6 +252,7 @@ SET TIMEOUT: webvtt/*
SET TIMEOUT: workers/*
SET TIMEOUT: xhr/resources/init.htm
SET TIMEOUT: xhr/resources/xmlhttprequest-timeout.js
+SET TIMEOUT: fenced-frame/resolve-to-config-promise.https.html
# generate_tests implementation and sample usage
GENERATE_TESTS: resources/test/tests/functional/generate-callback.html
diff --git a/tests/wpt/web-platform-tests/longtask-timing/META.yml b/tests/wpt/web-platform-tests/longtask-timing/META.yml
index 91c07f9fd3f..357ab18b24b 100644
--- a/tests/wpt/web-platform-tests/longtask-timing/META.yml
+++ b/tests/wpt/web-platform-tests/longtask-timing/META.yml
@@ -1,4 +1,4 @@
spec: https://w3c.github.io/longtasks/
suggested_reviewers:
- - spanicker
- - npm1
+ - noamr
+ - yoavweiss
diff --git a/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js b/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js
index fd9a3f042f6..af2e6221971 100644
--- a/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js
+++ b/tests/wpt/web-platform-tests/longtask-timing/idlharness.window.js
@@ -9,22 +9,19 @@ idl_test(
['longtasks'],
['performance-timeline', 'hr-time'],
(idl_array, t) => new Promise((resolve, reject) => {
-
-
const longTask = () => {
const begin = self.performance.now();
while (self.performance.now() < begin + 100);
}
t.step_timeout(longTask, 0);
- const observer = new PerformanceObserver(entryList => {
+ const observer = new PerformanceObserver((entryList, observer) => {
const entries = Array.from(entryList.getEntries());
- const attribution = entries.reduce(
- (sum, e) => sum.concat(e.attribution || []), []);
idl_array.add_objects({
- PerformanceLongTaskTiming: entries,
- TaskAttributionTiming: attribution,
+ PerformanceLongTaskTiming: entries.slice(0, 1),
+ TaskAttributionTiming: entries[0].attribution,
});
+ observer.disconnect();
resolve();
});
observer.observe({entryTypes: ['longtask']});
diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-detach-frame.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-detach-frame.html
new file mode 100644
index 00000000000..94d0ad18f94
--- /dev/null
+++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-detach-frame.html
@@ -0,0 +1,25 @@
+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>LongTask Timing: long task in nested child iframe</title>
+<body>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/utils.js"></script>
+
+<h1>Long Tasks with detached iframe</h1>
+<div id="log"></div>
+<script>
+ promise_test(async t => {
+ assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+ const iframe = document.createElement("iframe");
+ document.body.appendChild(iframe);
+ t.add_cleanup(() => iframe.remove());
+ t.step_timeout(() => {
+ busyWait();
+ iframe.remove();
+ });
+}, 'Performance longtask entries dont crash when a frame is detached.');
+</script>
+
+</body>
diff --git a/tests/wpt/web-platform-tests/longtask-timing/longtask-promise.html b/tests/wpt/web-platform-tests/longtask-timing/longtask-promise.html
new file mode 100644
index 00000000000..762511524bf
--- /dev/null
+++ b/tests/wpt/web-platform-tests/longtask-timing/longtask-promise.html
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML>
+<meta charset=utf-8>
+<title>LongTask Timing: Promise resolvers</title>
+<body>
+
+<script src="/resources/testharness.js"></script>
+<script src="/resources/testharnessreport.js"></script>
+<script src="resources/utils.js"></script>
+
+<h1>Long Task: promise resolvers</h1>
+<script>
+ function test_promise_long_task(name, promise) {
+ promise_test(async t => {
+ assert_implements(window.PerformanceLongTaskTiming, 'Longtasks are not supported.');
+ const longTaskPromise = new Promise(resolve => {
+ const observer = new PerformanceObserver(t.step_func(entryList => {
+ observer.disconnect();
+ resolve(entryList.getEntries());
+ }));
+ observer.observe({entryTypes: ['longtask']});
+ });
+
+ await promise().catch(() => {});
+ busyWait();
+ const entries = await longTaskPromise;
+ assert_greater_than_equal(entries.length, 1);
+ }, `Performance longtask entries after a promise: ${name}`);
+ }
+
+ test_promise_long_task("successful fetch", () => fetch("/common/dummy.xml"));
+ test_promise_long_task("Response.text()", () =>
+ fetch("/common/dummy.xml").then(r => r.text()));
+ test_promise_long_task("rejected fetch", () => fetch("/common/non-existent.xml"));
+ test_promise_long_task("JSON error", () => fetch("/common/dummy.xml").then(r => r.json()));
+</script>
+</body>
diff --git a/tests/wpt/web-platform-tests/longtask-timing/resources/utils.js b/tests/wpt/web-platform-tests/longtask-timing/resources/utils.js
index 7bb37bab32c..5498aa9a7b9 100644
--- a/tests/wpt/web-platform-tests/longtask-timing/resources/utils.js
+++ b/tests/wpt/web-platform-tests/longtask-timing/resources/utils.js
@@ -11,3 +11,8 @@ function checkLongTaskEntry(longtask, name = 'self') {
function hasUnrelatedTaskName(taskName, expectedTaskName) {
return (taskName !== expectedTaskName);
}
+
+function busyWait() {
+ const deadline = performance.now() + 100;
+ while (performance.now() < deadline) {}
+}
diff --git a/tests/wpt/web-platform-tests/page-visibility/resources/window_state_context.js b/tests/wpt/web-platform-tests/page-visibility/resources/window_state_context.js
index fa96bf3b760..844c440812c 100644
--- a/tests/wpt/web-platform-tests/page-visibility/resources/window_state_context.js
+++ b/tests/wpt/web-platform-tests/page-visibility/resources/window_state_context.js
@@ -1,37 +1,45 @@
function window_state_context(t) {
- let rect = null;
- let state = "restored";
- t.add_cleanup(async () => {
- if (state === "minimized")
- await restore();
- });
- async function restore() {
- state = "restored";
- await test_driver.set_window_rect(rect);
+ let rect = null;
+ let state = "restored";
+ t.add_cleanup(async () => {
+ if (state === "minimized") {
+ await restore();
}
-
- async function minimize() {
- state = "minimized";
- rect = await test_driver.minimize_window();
+ });
+ async function restore() {
+ if (state !== "minimized") {
+ return;
}
+ state = "restoring";
+ await test_driver.set_window_rect(rect);
+ state = "restored";
+ }
- function visibilityEventPromise() {
- return new Promise(resolve => new PerformanceObserver(
- (entries, observer) => { observer.disconnect(); resolve(); }).observe(
- {type: "visibility-state"}))
- }
+ async function minimize() {
+ state = "minimized";
+ rect = await test_driver.minimize_window();
+ }
- async function minimizeAndWait() {
- const promise = visibilityEventPromise();
- await Promise.all([minimize(), promise]);
- await new Promise(resolve => t.step_timeout(resolve, 0));
- }
+ function visibilityEventPromise() {
+ return new Promise((resolve) =>
+ new PerformanceObserver((entries, observer) => {
+ observer.disconnect();
+ resolve();
+ }).observe({ type: "visibility-state" })
+ );
+ }
- async function restoreAndWait() {
- const promise = visibilityEventPromise();
- await Promise.all([restore(), promise]);
- await new Promise(resolve => t.step_timeout(resolve, 0));
- }
+ async function minimizeAndWait() {
+ const promise = visibilityEventPromise();
+ await Promise.all([minimize(), promise]);
+ await new Promise((resolve) => t.step_timeout(resolve, 0));
+ }
+
+ async function restoreAndWait() {
+ const promise = visibilityEventPromise();
+ await Promise.all([restore(), promise]);
+ await new Promise((resolve) => t.step_timeout(resolve, 0));
+ }
- return {minimize, restore, minimizeAndWait, restoreAndWait};
+ return { minimize, restore, minimizeAndWait, restoreAndWait };
}
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html
index 70891c6ccf8..745d76c7294 100644
--- a/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/animation-timeline-view-functional-notation.tentative.html
@@ -8,6 +8,20 @@
<script src="/web-animations/testcommon.js"></script>
<script src="support/testcommon.js"></script>
<style>
+ @keyframes fade-in-out-without-timeline-range {
+ 0% { opacity: 0; }
+ 40% { opacity: 1; }
+ 60% { opacity: 1; }
+ 100% { opacity: 0; }
+ }
+ @keyframes fade-out-without-timeline-range {
+ 0% { opacity: 1; }
+ 100% { opacity: 0; }
+ }
+ @keyframes change-font-size-without-timeline-range {
+ 0% { font-size: 10px; }
+ 100% { font-size: 30px; }
+ }
@keyframes fade-in-out {
entry 0% { opacity: 0; }
entry 100% { opacity: 1; }
@@ -96,6 +110,203 @@ async function scrollTop(element, value) {
await waitForNextFrame();
}
+// ---------------------------------
+// Tests without timeline range name
+// ---------------------------------
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-in-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view()";
+ // So the range is [200px, 500px].
+
+ await scrollTop(container, 200);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 0%');
+ await scrollTop(container, 260);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 20%');
+ await scrollTop(container, 320);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 40%');
+
+ await scrollTop(container, 380);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 60%');
+ await scrollTop(container, 440);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 80%');
+ await scrollTop(container, 500);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view() without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-in-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(50px)";
+ // So the range is [250px, 450px].
+
+ await scrollTop(container, 250);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 0%');
+ await scrollTop(container, 290);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 20%');
+ await scrollTop(container, 330);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 40%');
+
+ await scrollTop(container, 370);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 60%');
+ await scrollTop(container, 410);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 80%');
+ await scrollTop(container, 450);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(50px) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-in-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(auto 50px)";
+ // So the range is [250px, 500px].
+
+ await scrollTop(container, 250);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 0%');
+ await scrollTop(container, 300);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 20%');
+ await scrollTop(container, 350);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 40%');
+
+ await scrollTop(container, 400);
+ assert_equals(getComputedStyle(div).opacity, '1', 'At 60%');
+ await scrollTop(container, 450);
+ assert_equals(getComputedStyle(div).opacity, '0.5', 'At 80%');
+ await scrollTop(container, 500);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(auto 50px) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(inline)";
+ // So the range is [-200px, 100px], but it is impossible to scroll to the
+ // negative part.
+
+ await scrollLeft(container, 0);
+ assert_approx_equals(parseFloat(getComputedStyle(div).opacity), 0.33333,
+ 0.00001, 'At 66.7%');
+ // Note: 20% for each 60px.
+ await scrollLeft(container, 40);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80%');
+ await scrollLeft(container, 100);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(inline) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(horizontal)";
+ // So the range is [-200px, 100px], but it is impossible to scroll to the
+ // negative part.
+
+ await scrollLeft(container, 0);
+ assert_approx_equals(parseFloat(getComputedStyle(div).opacity), 0.33333,
+ 0.00001, 'At 66.7%');
+ // Note: 20% for each 60px.
+ await scrollLeft(container, 40);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80%');
+ await scrollLeft(container, 100);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(horizontal) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ div.style.animation = "fade-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(vertical)";
+ // So the range is [-200px, 100px], but it is impossible to scroll to the
+ // negative part.
+
+ await scrollTop(container, 0);
+ assert_approx_equals(parseFloat(getComputedStyle(div).opacity), 0.33333,
+ 0.00001, 'At 66.7%');
+ // Note: 20% for each 60px.
+ await scrollTop(container, 40);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80%');
+ await scrollTop(container, 100);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(vertical) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-out-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(horizontal 50px)";
+ // So the range is [-150px, 50px], but it is impossible to scroll to the
+ // negative part.
+
+ // Note: 25% for each 50px.
+ await scrollLeft(container, 0);
+ assert_equals(getComputedStyle(div).opacity, '0.25', 'At 75%');
+ await scrollLeft(container, 10);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80%');
+ await scrollLeft(container, 50);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(horizontal 50px) without timeline range name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-out-without-timeline-range 1s linear, " +
+ "change-font-size-without-timeline-range 1s linear";
+ div.style.animationTimeline = "view(50px), view(inline 50px)";
+
+ await scrollLeft(container, 0);
+ assert_equals(getComputedStyle(div).fontSize, '25px', 'At 75% inline');
+ await scrollLeft(container, 10);
+ assert_equals(getComputedStyle(div).fontSize, '26px', 'At 80% inline');
+ await scrollLeft(container, 50);
+ assert_equals(getComputedStyle(div).fontSize, '30px', 'At 100% inline');
+
+ await scrollLeft(container, 0);
+
+ await scrollTop(container, 0);
+ assert_equals(getComputedStyle(div).opacity, '0.25', 'At 75% block');
+ await scrollTop(container, 10);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80% block');
+ await scrollTop(container, 50);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100% block');
+
+ await scrollLeft(container, 10);
+ await scrollTop(container, 10);
+ assert_equals(getComputedStyle(div).fontSize, '26px', 'At 80% inline');
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80% block');
+}, 'animation-timeline: view(50px), view(inline 50px) without timeline range ' +
+ 'name');
+
+promise_test(async t => {
+ let [container, div] = createTargetWithStuff(t, ['target', 'content']);
+ container.style.overflow = 'hidden';
+ div.style.animation = "fade-out-without-timeline-range 1s linear";
+
+ div.style.animationTimeline = "view(inline)";
+ await scrollLeft(container, 0);
+ assert_approx_equals(parseFloat(getComputedStyle(div).opacity), 0.33333,
+ 0.00001, 'At 66.7%');
+ await scrollLeft(container, 40);
+ assert_equals(getComputedStyle(div).opacity, '0.2', 'At 80%');
+ await scrollLeft(container, 100);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+
+ div.style.animationTimeline = "view(inline 50px)";
+ await scrollLeft(container, 0);
+ assert_equals(getComputedStyle(div).opacity, '0.25', 'At 75%');
+ await scrollLeft(container, 50);
+ assert_equals(getComputedStyle(div).opacity, '0', 'At 100%');
+}, 'animation-timeline: view(inline) changes to view(inline 50px), without' +
+ 'timeline range name');
+
+
+// ---------------------------------
+// Tests with timeline range name
+// ---------------------------------
+
promise_test(async t => {
let [container, div] = createTargetWithStuff(t, ['content', 'target', 'content']);
div.style.animation = "fade-in-out 1s linear";
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-timeline.html b/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-timeline.html
index 3f1aeed0ae9..eeb1e548e52 100644
--- a/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-timeline.html
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/progress-based-animation-timeline.html
@@ -1,5 +1,6 @@
<!DOCTYPE html>
<title>CSS Animation using progress based timeline</title>
+<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1">
<link rel="help" src="https://drafts.csswg.org/css-animations-2/#animation-timeline">
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset-ref.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset-ref.html
new file mode 100644
index 00000000000..8e6907860ba
--- /dev/null
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset-ref.html
@@ -0,0 +1,44 @@
+<!DOCTYPE html>
+<style>
+
+#scroller {
+ overflow-y: auto;
+ height: 200px;
+ border: 2px solid green;
+ position: relative;
+ background: gray;
+}
+
+.spacer {
+ height: 1000px;
+}
+
+#align {
+ box-sizing: border-box;
+ width: 100%;
+ height: 50px;
+ background: rgba(0, 0, 200, 0.2);
+ color: white;
+ position: absolute;
+ border: 1px solid white;
+ transform: translateY(200px);
+ will-change: transform;
+}
+
+#marker {
+ width: 100%;
+ height: 50px;
+ background: #640;
+ position: absolute;
+ top: 350px;
+}
+
+</style>
+<div id="scroller">
+ <div id="align">TOP</div>
+ <div class="spacer"></div>
+ <div id="marker">BOTTOM</div>
+</div>
+<script>
+ scroller.scrollTo(0, 200);
+</script>
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset.html b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset.html
new file mode 100644
index 00000000000..34ae52d4792
--- /dev/null
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/scroll-animation-initial-offset.html
@@ -0,0 +1,73 @@
+<!DOCTYPE html>
+<html class="reftest-wait">
+<title>Composited scroll-linked animation with initial scroll offset</title>
+<link rel="help" href="https://drafts.csswg.org/scroll-animations-1/">
+<link rel="match" href="scroll-animation-initial-offset-ref.html">
+<style>
+
+#scroller {
+ overflow-y: auto;
+ height: 200px;
+ border: 2px solid green;
+ position: relative;
+ background: gray;
+}
+
+.spacer {
+ height: 1000px;
+}
+
+@keyframes anim {
+ 0% { transform: translateY(0); }
+ 100% { transform: translateY(800px); }
+}
+
+#align {
+ box-sizing: border-box;
+ width: 100%;
+ height: 50px;
+ background: rgba(0, 0, 200, 0.2);
+ color: white;
+ position: absolute;
+ border: 1px solid white;
+ animation: anim linear 10s;
+ animation-timeline: scroll();
+ will-change: transform;
+}
+
+#marker {
+ width: 100%;
+ height: 50px;
+ background: #640;
+ position: absolute;
+ top: 350px;
+}
+
+</style>
+<div id="scroller">
+ <div id="align">TOP</div>
+ <div class="spacer"></div>
+ <div id="marker">BOTTOM</div>
+</div>
+<script>
+
+ // Test that a scroll-linked animation of a composited property reacts
+ // correctly to a programmatic scroll early during the page load.
+ //
+ // The scroll offset will change before the animation is "started" on the
+ // compositor, so it needs to be able to handle a non-zero initial offset.
+ //
+ scroller.scrollTo(0, 200);
+
+</script>
+<script src="/web-animations/testcommon.js"></script>
+<script>
+
+ document.documentElement.addEventListener('TestRendered', async () => {
+ await waitForCompositorReady();
+ await waitForNextFrame();
+ await waitForNextFrame();
+ document.documentElement.classList.remove("reftest-wait");
+ }, { once: true });
+
+</script>
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-animation.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-animation.html
index 73189b85917..a367ef9dd87 100644
--- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-animation.html
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-animation.html
@@ -122,7 +122,7 @@
<template id=multiple_timelines>
<style>
#timelines {
- view-timeline: tv vertical, th horizontal;
+ view-timeline: tv vertical ancestor, th horizontal ancestor;
background-color: red;
}
#scroller {
@@ -132,6 +132,7 @@
display: grid;
grid-template-columns: 50px 50px 50px 50px 50px 50px 50px;
grid-template-row: 50px 50px 50px 50px 50px 50px 50px;
+ view-timeline: tv defer, th defer;
}
#scroller > div {
z-index: -1;
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html
index 76a30ad5660..207c8c4e223 100644
--- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-dynamic.html
@@ -14,6 +14,7 @@
overflow: hidden;
width: 100px;
height: 100px;
+ view-timeline: t1 defer;
}
.scroller > div {
height: 100px;
@@ -45,7 +46,7 @@
<template id=dynamic_view_timeline_name>
<style>
.timeline {
- view-timeline-name: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -68,27 +69,34 @@
// scrollTop=50 is 75% for div75.
div75.classList.add('timeline');
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '75');
+ assert_equals(getComputedStyle(target).zIndex, '75', 'div75');
- // scrollTop=50 is 25% for div25.
+ // Identical timelines in div75 and div25 creates an ambiguity.
div25.classList.add('timeline');
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '25');
+ assert_equals(getComputedStyle(target).zIndex, '-1', 'ambiguous');
+ // Removing the timeline from div75 unambiguously links div25 to the
+ // timeline, making scrollTop=50 at 25% for div25.
+ div75.classList.remove('timeline');
+ await waitForCSSScrollTimelineStyle();
+ assert_equals(getComputedStyle(target).zIndex, '25', 'div25');
// scrollTop=50 is before the timeline start for div_before.
+ div25.classList.remove('timeline');
div_before.classList.add('timeline');
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '-1');
+ assert_equals(getComputedStyle(target).zIndex, '-1', 'ahead of div_before');
// Scroll to 25% (for div_before) to verify that we're linked to that
// timeline.
await scrollTop(scroller, 150);
- assert_equals(getComputedStyle(target).zIndex, '25');
+ assert_equals(getComputedStyle(target).zIndex, '25', 'div_before');
- // Now we should be back to div25's timeline, although with the new
- // scrollTop=150, it's actually at 75%.
+ // Linking the timeline back to div25 verifies that the new scrollTop=150 is
+ // actually at 75%.
div_before.classList.remove('timeline');
+ div25.classList.add('timeline');
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '75');
+ assert_equals(getComputedStyle(target).zIndex, '75', 'div25 again');
}, 'Dynamically changing view-timeline-name');
</script>
@@ -98,7 +106,7 @@
width: 100px;
height: 100px;
margin: 100px;
- view-timeline-name: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -117,10 +125,10 @@
await scrollTop(scroller, 50); // 25% (vertical)
await scrollLeft(scroller, 20); // 10% (horizontal)
- assert_equals(getComputedStyle(target).zIndex, '25');
+ assert_equals(getComputedStyle(target).zIndex, '25', 'vertical');
timeline.style.viewTimelineAxis = 'horizontal';
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '10');
+ assert_equals(getComputedStyle(target).zIndex, '10', 'horizontal');
}, 'Dynamically changing view-timeline-axis');
</script>
@@ -130,7 +138,7 @@
width: 100px;
height: 100px;
margin: 100px;
- view-timeline-name: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -148,17 +156,17 @@
await scrollTop(scroller, 50); // 25% (without inset).
- assert_equals(getComputedStyle(target).zIndex, '25');
+ assert_equals(getComputedStyle(target).zIndex, '25', 'without inset');
timeline.style.viewTimelineInset = '0px 50px';
await waitForCSSScrollTimelineStyle();
- assert_equals(getComputedStyle(target).zIndex, '0');
+ assert_equals(getComputedStyle(target).zIndex, '0', 'with inset');
}, 'Dynamically changing view-timeline-inset');
</script>
<template id=timeline_display_none>
<style>
#timeline {
- view-timeline-name: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -176,12 +184,10 @@
inflate(t, timeline_display_none);
await scrollTop(scroller, 50);
- assert_equals(getComputedStyle(target).zIndex, '25');
+ assert_equals(getComputedStyle(target).zIndex, '25', 'display:block');
timeline.style.display = 'none';
- // Animation is held at previous current time.
- assert_equals(getComputedStyle(target).zIndex, '25');
- const anim = target.getAnimations()[0];
- assert_equals(anim.startTime, null);
- assert_times_equal(anim.currentTime, 250);
+ await waitForNextFrame();
+ // The timeline became inactive.
+ assert_equals(getComputedStyle(target).zIndex, '-1', 'display:none');
}, 'Element with view-timeline becoming display:none');
</script>
diff --git a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-lookup.html b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-lookup.html
index b8a5b0008be..6cead9dc586 100644
--- a/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-lookup.html
+++ b/tests/wpt/web-platform-tests/scroll-animations/css/view-timeline-lookup.html
@@ -57,9 +57,12 @@
<template id=timeline_preceding_sibling>
<style>
+ #scroller {
+ view-timeline: t1 defer;
+ }
#timeline {
height: 0px;
- view-timeline: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -118,9 +121,12 @@
<template id=timeline_ancestor_sibling>
<style>
+ #scroller {
+ view-timeline: t1 defer;
+ }
#timeline {
height: 0px;
- view-timeline: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -148,11 +154,14 @@
}, 'view-timeline on ancestor sibling');
</script>
-<template id=timeline_ancestor_sibling_closest>
+<template id=timeline_ancestor_sibling_conflict>
<style>
+ #scroller {
+ view-timeline: t1 defer;
+ }
#timeline1, #timeline2 {
height: 0px;
- view-timeline: t1;
+ view-timeline: t1 ancestor;
}
#target {
animation: anim 1s linear;
@@ -175,61 +184,23 @@
</template>
<script>
promise_test(async (t) => {
- inflate(t, timeline_ancestor_sibling_closest);
+ inflate(t, timeline_ancestor_sibling_conflict);
await waitForNextFrame();
- assert_equals(getComputedStyle(target).zIndex, '50');
- }, 'view-timeline on ancestor sibling, closest wins');
+ assert_equals(getComputedStyle(target).zIndex, 'auto');
+ }, 'view-timeline on ancestor sibling, conflict remains unresolved');
</script>
-<template id=timeline_ancestor_sibling_skips_nonmatching>
+<template id=timeline_ancestor_closer_timeline_wins>
<style>
- #timeline1 {
- height: 0px;
- view-timeline: t1;
- }
- #timeline2 {
- height: 0px;
- view-timeline: t2;
+ #scroller {
+ view-timeline: t1 defer;
}
- #target {
- animation: anim 1s linear;
- animation-timeline: t1;
- }
- </style>
- <div id=scroller class=scroller>
- <div></div>
- <div id=timeline1></div>
- <div></div>
- <div id=timeline2></div>
- <div>
- <div>
- <div id=target></div>
- </div>
- </div>
- <div></div>
- <div></div>
- </div>
-</template>
-<script>
- promise_test(async (t) => {
- inflate(t, timeline_ancestor_sibling_skips_nonmatching);
- await waitForNextFrame();
- assert_equals(getComputedStyle(target).zIndex, '75');
- }, 'view-timeline on ancestor sibling, skips nonmatching names');
-</script>
-
-<template id=timeline_ancestor_closer_scroll_timeline_wins>
- <style>
#timeline {
height: 0px;
- view-timeline: t1;
+ view-timeline: t1 ancestor;
}
- #scroll {
- overflow: auto;
- scroll-timeline: t1;
- }
- #scroll > div {
- height: 50px;
+ #parent {
+ scroll-timeline: t1 defer;
}
#target {
animation: anim 1s linear;
@@ -240,13 +211,8 @@
<div></div>
<div id=timeline></div>
<div></div>
- <div id=scroll>
- <div></div>
- </div>
- <div>
- <div>
- <div id=target></div>
- </div>
+ <div id=parent>
+ <div id=target></div>
</div>
<div></div>
<div></div>
@@ -254,18 +220,22 @@
</template>
<script>
promise_test(async (t) => {
- inflate(t, timeline_ancestor_closer_scroll_timeline_wins);
+ inflate(t, timeline_ancestor_closer_timeline_wins);
await waitForNextFrame();
- assert_equals(getComputedStyle(target).zIndex, '0');
- }, 'view-timeline on ancestor sibling, closer scroll-timeline wins');
+ assert_equals(getComputedStyle(target).zIndex, 'auto');
+ }, 'view-timeline on ancestor sibling, closer timeline wins');
</script>
<template id=timeline_ancestor_scroll_timeline_wins_on_same_element>
<style>
+ #scroller {
+ view-timeline: t1 defer;
+ scroll-timeline: t1 defer;
+ }
#timelines {
height: 0px;
- view-timeline: t1;
- scroll-timeline: t1;
+ view-timeline: t1 ancestor;
+ scroll-timeline: t1 ancestor;
overflow: auto;
}
#timelines > div {
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-timing.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-timing.https.html
index 6b51a5c2da2..75cab40458c 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-timing.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/navigation-timing.https.html
@@ -54,6 +54,7 @@ promise_test(async (t) => {
t.add_cleanup(() => frame.remove());
const timing = await navigate_in_frame(frame, scope);
+ assert_greater_than(timing.workerStart, 0);
verify(timing);
}, 'Service worker controlled navigation timing network fallback');
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html b/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html
index 6744edc0eac..ab667013a2b 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/partitioned-cookies.tentative.https.html
@@ -59,7 +59,7 @@ promise_test(async t => {
document.cookie = '__Host-partitioned=123; Secure; Path=/; SameSite=None; Partitioned;';
assert_true(document.cookie.includes('__Host-partitioned=123'));
- // Test that the partitioned cookie is available to this worker.
+ // Test that the partitioned cookie is available to this worker via HTTP.
wait_promise = new Promise(resolve => {
resolve_wait_promise = resolve;
});
@@ -67,10 +67,23 @@ promise_test(async t => {
got = ev.data;
resolve_wait_promise();
};
- filtered_registrations[0].active.postMessage({type: 'echo_cookies'});
+ filtered_registrations[0].active.postMessage({type: 'echo_cookies_http'});
await wait_promise;
assert_true(got.ok, 'Get cookies');
- assert_true(got.cookies.includes('__Host-partitioned'), 'Can access partitioned cookie');
+ assert_true(got.cookies.includes('__Host-partitioned'), 'Can access partitioned cookie via HTTP');
+
+ // Test that the partitioned cookie is available to this worker via CookieStore API.
+ wait_promise = new Promise(resolve => {
+ resolve_wait_promise = resolve;
+ });
+ on_message = ev => {
+ got = ev.data;
+ resolve_wait_promise();
+ };
+ filtered_registrations[0].active.postMessage({type: 'echo_cookies_js'});
+ await wait_promise;
+ assert_true(got.ok, 'Get cookies');
+ assert_true(got.cookies.includes('__Host-partitioned'), 'Can access partitioned cookie via JS');
const popup = window.open(
new URL(
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-credentialless-frame.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-credentialless-frame.html
new file mode 100644
index 00000000000..3fdf937ae1a
--- /dev/null
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-credentialless-frame.html
@@ -0,0 +1,69 @@
+<!DOCTYPE html>
+<head>
+<meta charset="utf-8"/>
+<meta name="timeout" content="long">
+<title>Service Worker: Partitioned Cookies 3P Credentialless Iframe</title>
+<script src="/resources/testharness.js"></script>
+<script src="test-helpers.sub.js"></script>
+<script src="/common/get-host-info.sub.js"></script>
+</head>
+
+<body>
+<script>
+
+// Check workers registered by a credentialless frame can access cookies set in that frame.
+promise_test(async t => {
+ const script = './partitioned-cookies-3p-sw.js';
+ const scope = './partitioned-cookies-3p-';
+ const absolute_scope = new URL(scope, window.location).href;
+
+ // Set a Partitioned cookie.
+ document.cookie = '__Host-partitioned=123; Secure; Path=/; SameSite=None; Partitioned;';
+ assert_true(document.cookie.includes('__Host-partitioned=123'));
+
+ const reg = await service_worker_unregister_and_register(t, script, scope);
+ await wait_for_state(t, reg.installing, 'activated');
+
+ let retrieved_registrations =
+ await navigator.serviceWorker.getRegistrations();
+ let filtered_registrations =
+ retrieved_registrations.filter(reg => reg.scope == absolute_scope);
+
+ // on_message will be reassigned below based on the expected reply from the service worker.
+ let on_message;
+ self.addEventListener('message', ev => on_message(ev));
+ navigator.serviceWorker.addEventListener('message', evt => {
+ self.postMessage(evt.data, '*');
+ });
+
+ // First test that the worker script started correctly and message passing is enabled.
+ let resolve_wait_promise;
+ let wait_promise = new Promise(resolve => {
+ resolve_wait_promise = resolve;
+ });
+ let got;
+ on_message = ev => {
+ got = ev.data;
+ resolve_wait_promise();
+ };
+ filtered_registrations[0].active.postMessage({type: 'test_message'});
+ await wait_promise;
+ assert_true(got.ok, 'Message passing');
+
+ // Test that the partitioned cookie is available to this worker via CookieStore API.
+ wait_promise = new Promise(resolve => {
+ resolve_wait_promise = resolve;
+ });
+ on_message = ev => {
+ got = ev.data;
+ resolve_wait_promise();
+ };
+ filtered_registrations[0].active.postMessage({type: 'echo_cookies_js'});
+ await wait_promise;
+ assert_true(got.ok, 'Get cookies');
+ assert_true(got.cookies.includes('__Host-partitioned'), 'Can access partitioned cookie');;
+});
+
+</script>
+</body>
+</html> \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html
index d3962d2e600..6a8ed6ca989 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-frame.html
@@ -46,7 +46,7 @@ promise_test(async t => {
await wait_promise;
assert_true(got.ok, 'Message passing');
- // Test that the partitioned cookie is not available to this worker.
+ // Test that the partitioned cookie is not available to this worker via HTTP.
wait_promise = new Promise(resolve => {
resolve_wait_promise = resolve;
});
@@ -54,7 +54,22 @@ promise_test(async t => {
got = ev.data;
resolve_wait_promise();
};
- filtered_registrations[0].active.postMessage({type: 'echo_cookies'});
+ filtered_registrations[0].active.postMessage({type: 'echo_cookies_http'});
+ await wait_promise;
+ assert_true(got.ok, 'Get cookies');
+ assert_false(
+ got.cookies.includes('__Host-partitioned'),
+ 'Worker cannot access partitioned cookie');
+
+ // Test that the partitioned cookie is not available to this worker via CookieStore API.
+ wait_promise = new Promise(resolve => {
+ resolve_wait_promise = resolve;
+ });
+ on_message = ev => {
+ got = ev.data;
+ resolve_wait_promise();
+ };
+ filtered_registrations[0].active.postMessage({type: 'echo_cookies_js'});
await wait_promise;
assert_true(got.ok, 'Get cookies');
assert_false(
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js
index 2f54a984b19..bc2a2831568 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-sw.js
@@ -6,8 +6,10 @@ async function onMessage(event) {
switch (event.data.type) {
case 'test_message':
return onTestMessage(event);
- case 'echo_cookies':
- return onEchoCookies(event);
+ case 'echo_cookies_http':
+ return onEchoCookiesHttp(event);
+ case 'echo_cookies_js':
+ return onEchoCookiesJs(event);
default:
return;
}
@@ -18,8 +20,19 @@ async function onTestMessage(event) {
event.source.postMessage({ok: true});
}
+async function onEchoCookiesHttp(event) {
+ try {
+ const resp = await fetch(
+ `${self.origin}/cookies/resources/list.py`, {credentials: 'include'});
+ const cookies = await resp.json();
+ event.source.postMessage({ok: true, cookies: Object.keys(cookies)});
+ } catch (err) {
+ event.source.postMessage({ok: false});
+ }
+}
+
// echo_cookies returns the names of all of the cookies available to the worker.
-async function onEchoCookies(event) {
+async function onEchoCookiesJs(event) {
try {
const cookie_objects = await self.cookieStore.getAll();
const cookies = cookie_objects.map(c => c.name);
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html
index d86a5eb2097..8e90609da22 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-3p-window.html
@@ -20,6 +20,14 @@ promise_test(async t => {
first_party_origin + location.pathname).href;
document.body.appendChild(iframe);
fetch_tests_from_window(iframe.contentWindow);
+
+ const credentialless_frame = document.createElement('iframe');
+ credentialless_frame.credentialless = true;
+ credentialless_frame.src = new URL(
+ './partitioned-cookies-3p-credentialless-frame.html',
+ first_party_origin + location.pathname).href;
+ document.body.appendChild(credentialless_frame);
+ fetch_tests_from_window(credentialless_frame.contentWindow);
});
</script>
diff --git a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js
index 2f54a984b19..bc2a2831568 100644
--- a/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js
+++ b/tests/wpt/web-platform-tests/service-workers/service-worker/resources/partitioned-cookies-sw.js
@@ -6,8 +6,10 @@ async function onMessage(event) {
switch (event.data.type) {
case 'test_message':
return onTestMessage(event);
- case 'echo_cookies':
- return onEchoCookies(event);
+ case 'echo_cookies_http':
+ return onEchoCookiesHttp(event);
+ case 'echo_cookies_js':
+ return onEchoCookiesJs(event);
default:
return;
}
@@ -18,8 +20,19 @@ async function onTestMessage(event) {
event.source.postMessage({ok: true});
}
+async function onEchoCookiesHttp(event) {
+ try {
+ const resp = await fetch(
+ `${self.origin}/cookies/resources/list.py`, {credentials: 'include'});
+ const cookies = await resp.json();
+ event.source.postMessage({ok: true, cookies: Object.keys(cookies)});
+ } catch (err) {
+ event.source.postMessage({ok: false});
+ }
+}
+
// echo_cookies returns the names of all of the cookies available to the worker.
-async function onEchoCookies(event) {
+async function onEchoCookiesJs(event) {
try {
const cookie_objects = await self.cookieStore.getAll();
const cookies = cookie_objects.map(c => c.name);
diff --git a/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html b/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html
deleted file mode 100644
index 5fc4f84a7b9..00000000000
--- a/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-delegatesFocus.html
+++ /dev/null
@@ -1,75 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/resources/testdriver-actions.js"></script>
-<script src="/resources/declarative-shadow-dom-polyfill.js"></script>
-<script src="resources/shadow-dom.js"></script>
-<script src="resources/focus-utils.js"></script>
-
-<style>
- div.scroll {
- overflow: auto;
- width: 20em;
- height: 5em;
- display: block;
- }
-</style>
-
-<p>Tests for moving focus on scrollable element by pressing tab key.</p>
-<button id="start">START</button>
-
-<p>Where host has delegatesFocus false.</p>
-<div id="host-no-delegates-focus" class="scroll">
- <template shadowrootmode="open">
- <div style="width: 40em"></div>
- <button id="A">BUTTON A</button>
- <div>Text</div>
- </template>
-</div>
-
-<div id="host-no-delegates-focus-2" class="scroll">
- <template shadowrootmode="open">
- <div style="width: 40em"></div>
- <div>Text</div>
- </template>
-</div>
-
-<p>Where host has delegatesFocus true.</p>
-<div id="host-delegates-focus" class="scroll">
- <template shadowrootmode="open" shadowrootdelegatesfocus>
- <div style="width: 40em"></div>
- <button id="B">BUTTON B</button>
- <div>Text</div>
- </template>
-</div>
-
-<div id="host-delegates-focus-2" class="scroll">
- <template shadowrootmode="open" shadowrootdelegatesfocus>
- <div style="width: 40em"></div>
- <div>Text</div>
- </template>
-</div>
-
-<button id="end">END</button>
-
-<script>
-
-promise_test(async () => {
- polyfill_declarative_shadow_dom(document);
-
- let elements = [
- 'start',
- 'host-no-delegates-focus/A',
- 'host-no-delegates-focus-2',
- 'host-delegates-focus/B',
- 'end'
- ];
-
- await assert_focus_navigation_forward(elements);
- elements.reverse();
- await assert_focus_navigation_backward(elements);
-}, 'Should focus on scroller across shadow boundaries depending on delegatesFocus value.');
-
-</script>
diff --git a/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html b/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html
deleted file mode 100644
index 0b5b66eb48d..00000000000
--- a/tests/wpt/web-platform-tests/shadow-dom/focus-navigation/focus-navigation-scroller-tabindex.html
+++ /dev/null
@@ -1,83 +0,0 @@
-<!DOCTYPE html>
-<script src="/resources/testharness.js"></script>
-<script src="/resources/testharnessreport.js"></script>
-<script src="/resources/testdriver.js"></script>
-<script src="/resources/testdriver-vendor.js"></script>
-<script src="/resources/testdriver-actions.js"></script>
-<script src="resources/shadow-dom.js"></script>
-<script src="resources/focus-utils.js"></script>
-
-<style>
- div.scroll {
- overflow: auto;
- width: 20em;
- height: 5em;
- display: block;
- }
-
- div.long {
- width: 40em;
- }
-</style>
-
-<p>Tests for moving focus on scrollable element by pressing tab key.</p>
-<button id="start">START</button>
-
-<p>Where element has positive tabindex.</p>
-<div id="scroller-positive" class="scroll" tabindex="0">
- <div class="long"></div>
- <button id="A">BUTTON A</button>
- <div>Text</div>
-</div>
-
-<div id="scroller-positive-2" class="scroll" tabindex="0">
- <div class="long"></div>
- <div>Text</div>
-</div>
-
-<p>Where element has no tabindex.</p>
-<div id="scroller-none" class="scroll">
- <div class="long"></div>
- <button id="B">BUTTON B</button>
- <div>Text</div>
-</div>
-
-<div id="scroller-none-2" class="scroll">
- <div class="long"></div>
- <div>Text</div>
-</div>
-
-<p>Where element has negative tabindex.</p>
-<div id="scroller-negative" class="scroll" tabindex="-1">
- <div class="long"></div>
- <button id="C">BUTTON C</button>
- <div>Text</div>
-</div>
-
-<div id="scroller-negative-2" class="scroll" tabindex="-1">
- <div class="long"></div>
- <div>Text</div>
-</div>
-
-<button id="end">END</button>
-
-<script>
-
-promise_test(async () => {
- let elements = [
- 'start',
- 'scroller-positive',
- 'A',
- 'scroller-positive-2',
- 'B',
- 'scroller-none-2',
- 'C',
- 'end',
- ];
-
- await assert_focus_navigation_forward(elements);
- elements.reverse();
- await assert_focus_navigation_backward(elements);
-}, 'Should focus on scroller depending on tabindex value.');
-
-</script>
diff --git a/tests/wpt/web-platform-tests/speculation-rules/prefetch/document-rules.https.html b/tests/wpt/web-platform-tests/speculation-rules/prefetch/document-rules.https.html
index eb8170923dc..701987c4318 100644
--- a/tests/wpt/web-platform-tests/speculation-rules/prefetch/document-rules.https.html
+++ b/tests/wpt/web-platform-tests/speculation-rules/prefetch/document-rules.https.html
@@ -21,6 +21,7 @@
<meta name="variant" content="?include=selectorMatchesDisplayNone">
<meta name="variant" content="?include=selectorMatchesDisplayLocked">
<meta name="variant" content="?include=unslottedLink">
+<meta name="variant" content="?include=immediateMutation">
<body>
<script>
@@ -294,5 +295,23 @@
await new Promise(resolve => t.step_timeout(resolve, 2000));
assert_equals(await isUrlPrefetched(url), 0);
}, 'test that unslotted link never matches document rule');
+
+ subsetTestByKey('immediateMutation', promise_test, async t => {
+ assert_implements(HTMLScriptElement.supports('speculationrules'),
+ 'Speculation Rules not supported');
+
+ // Add a link and allow it to get its style computed.
+ // (Double RAF lets this happen normally.)
+ const url = getPrefetchUrl();
+ const link = addLink(url, document.body);
+ await new Promise(resolve => requestAnimationFrame(() => requestAnimationFrame(() => resolve())));
+
+ // Add a document rule and then immediately change the DOM to make it match.
+ insertDocumentRule({ selector_matches: '.late-class *' });
+ document.body.className = 'late-class';
+
+ await new Promise(resolve => t.step_timeout(resolve, 2000));
+ assert_equals(await isUrlPrefetched(url), 1);
+ }, 'test that selector_matches predicates respect changes immediately');
</script>
</body>
diff --git a/tests/wpt/web-platform-tests/storage/buckets/buckets_storage_policy.tentative.https.any.js b/tests/wpt/web-platform-tests/storage/buckets/buckets_storage_policy.tentative.https.any.js
index d6dce3675d0..a66fd81cd43 100644
--- a/tests/wpt/web-platform-tests/storage/buckets/buckets_storage_policy.tentative.https.any.js
+++ b/tests/wpt/web-platform-tests/storage/buckets/buckets_storage_policy.tentative.https.any.js
@@ -19,3 +19,28 @@ promise_test(async testCase => {
navigator.storageBuckets.open(
'above_max', {quota: Number.MAX_SAFE_INTEGER + 1}));
}, 'The open promise should reject with a TypeError when quota is requested outside the range of 1 to Number.MAX_SAFE_INTEGER.');
+
+
+promise_test(async testCase => {
+ await prepareForBucketTest(testCase);
+
+ // IndexedDB
+ {
+ const quota = 1;
+ const bucket = await navigator.storageBuckets.open('idb', {quota});
+
+ const objectStoreName = 'store';
+ const db = await indexedDbOpenRequest(
+ testCase, bucket.indexedDB, 'db', (db_to_upgrade) => {
+ db_to_upgrade.createObjectStore(objectStoreName);
+ });
+
+ const overflowBuffer = new Uint8Array(quota + 1);
+
+ const txn = db.transaction(objectStoreName, 'readwrite');
+ txn.objectStore(objectStoreName).add('', overflowBuffer);
+
+ await promise_rejects_dom(
+ testCase, 'QuotaExceededError', transactionPromise(txn));
+ }
+}, 'A QuotaExceededError is thrown when a storage API exceeds the quota of the bucket its in.');
diff --git a/tests/wpt/web-platform-tests/storage/buckets/resources/cached-resource.txt b/tests/wpt/web-platform-tests/storage/buckets/resources/cached-resource.txt
new file mode 100644
index 00000000000..c57eff55ebc
--- /dev/null
+++ b/tests/wpt/web-platform-tests/storage/buckets/resources/cached-resource.txt
@@ -0,0 +1 @@
+Hello World! \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/storage/buckets/resources/util.js b/tests/wpt/web-platform-tests/storage/buckets/resources/util.js
index 50abce14cdc..425303ce2c9 100644
--- a/tests/wpt/web-platform-tests/storage/buckets/resources/util.js
+++ b/tests/wpt/web-platform-tests/storage/buckets/resources/util.js
@@ -13,3 +13,45 @@ async function prepareForBucketTest(test) {
}
});
}
+
+function indexedDbOpenRequest(t, idb, dbname, upgrade_func) {
+ return new Promise((resolve, reject) => {
+ const openRequest = idb.open(dbname);
+ t.add_cleanup(() => {
+ indexedDbDeleteRequest(idb, dbname);
+ });
+
+ openRequest.onerror = () => {
+ reject(openRequest.error);
+ };
+ openRequest.onsuccess = () => {
+ resolve(openRequest.result);
+ };
+ openRequest.onupgradeneeded = event => {
+ upgrade_func(openRequest.result);
+ };
+ });
+}
+
+function indexedDbDeleteRequest(idb, name) {
+ return new Promise((resolve, reject) => {
+ const deleteRequest = idb.deleteDatabase(name);
+ deleteRequest.onerror = () => {
+ reject(deleteRequest.error);
+ };
+ deleteRequest.onsuccess = () => {
+ resolve();
+ };
+ });
+}
+
+function transactionPromise(txn) {
+ return new Promise((resolve, reject) => {
+ txn.onabort = () => {
+ reject(txn.error);
+ };
+ txn.oncomplete = () => {
+ resolve();
+ };
+ });
+}
diff --git a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js
index b0c6b944dd6..f0b82b9fa09 100644
--- a/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js
+++ b/tests/wpt/web-platform-tests/storage/estimate-indexeddb.https.any.js
@@ -1,46 +1,5 @@
// META: title=StorageManager: estimate() for indexeddb
-
-function indexedDbOpenRequest(t, dbname, upgrade_func) {
- return new Promise((resolve, reject) => {
- const openRequest = indexedDB.open(dbname);
- t.add_cleanup(() => {
- indexedDbDeleteRequest(dbname);
- });
-
- openRequest.onerror = () => {
- reject(openRequest.error);
- };
- openRequest.onsuccess = () => {
- resolve(openRequest.result);
- };
- openRequest.onupgradeneeded = event => {
- upgrade_func(openRequest.result);
- };
- });
-}
-
-function indexedDbDeleteRequest(name) {
- return new Promise((resolve, reject) => {
- const deleteRequest = indexedDB.deleteDatabase(name);
- deleteRequest.onerror = () => {
- reject(deleteRequest.error);
- };
- deleteRequest.onsuccess = () => {
- resolve();
- };
- });
-}
-
-function transactionPromise(txn) {
- return new Promise((resolve, reject) => {
- txn.onabort = () => {
- reject(txn.error);
- };
- txn.oncomplete = () => {
- resolve();
- };
- });
-}
+// META: script=/storage/buckets/resources/util.js
test(t => {
assert_true('estimate' in navigator.storage);
@@ -60,16 +19,17 @@ promise_test(async t => {
promise_test(async t => {
const arraySize = 1e6;
const objectStoreName = "storageManager";
- const dbname = this.window ? window.location.pathname :
- "estimate-worker.https.html";
+ const dbname =
+ this.window ? window.location.pathname : 'estimate-worker.https.html';
- await indexedDbDeleteRequest(dbname);
+ await indexedDbDeleteRequest(indexedDB, dbname);
let estimate = await navigator.storage.estimate();
const usageBeforeCreate = estimate.usage;
- const db = await indexedDbOpenRequest(t, dbname, (db_to_upgrade) => {
- db_to_upgrade.createObjectStore(objectStoreName);
- });
+ const db =
+ await indexedDbOpenRequest(t, indexedDB, dbname, (db_to_upgrade) => {
+ db_to_upgrade.createObjectStore(objectStoreName);
+ });
estimate = await navigator.storage.estimate();
const usageAfterCreate = estimate.usage;
@@ -86,7 +46,7 @@ promise_test(async t => {
view[i] = Math.floor(Math.random() * 255);
}
- const testBlob = new Blob([buffer], {type: "binary/random"});
+ const testBlob = new Blob([buffer], {type: 'binary/random'});
txn.objectStore(objectStoreName).add(testBlob, 1);
await transactionPromise(txn);
diff --git a/tests/wpt/web-platform-tests/tools/ci/manifest_build.py b/tests/wpt/web-platform-tests/tools/ci/manifest_build.py
index 25a1a5f7402..6d93a352583 100644
--- a/tests/wpt/web-platform-tests/tools/ci/manifest_build.py
+++ b/tests/wpt/web-platform-tests/tools/ci/manifest_build.py
@@ -12,7 +12,7 @@ import requests
here = os.path.abspath(os.path.dirname(__file__))
wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
-if not(wpt_root in sys.path):
+if wpt_root not in sys.path:
sys.path.append(wpt_root)
from tools.wpt.testfiles import get_git_cmd
diff --git a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt
index 67e46ed204c..5c14ac4d40a 100644
--- a/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt
+++ b/tests/wpt/web-platform-tests/tools/ci/requirements_tc.txt
@@ -1,4 +1,4 @@
pygithub==1.58.1
pyyaml==6.0
-requests==2.29.0
-taskcluster==49.1.2
+requests==2.30.0
+taskcluster==49.1.3
diff --git a/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py b/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py
index e982ca33d01..a334d39eec4 100644
--- a/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py
+++ b/tests/wpt/web-platform-tests/tools/ci/tc/github_checks_output.py
@@ -1,7 +1,4 @@
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Optional, Text
+from typing import Optional, Text
class GitHubChecksOutputter:
@@ -13,12 +10,10 @@ class GitHubChecksOutputter:
https://docs.taskcluster.net/docs/reference/integrations/github/checks#custom-text-output-in-checks
"""
- def __init__(self, path):
- # type: (Text) -> None
+ def __init__(self, path: Text) -> None:
self.path = path
- def output(self, line):
- # type: (Text) -> None
+ def output(self, line: Text) -> None:
with open(self.path, mode="a") as f:
f.write(line)
f.write("\n")
@@ -27,8 +22,7 @@ class GitHubChecksOutputter:
__outputter = None
-def get_gh_checks_outputter(filepath):
- # type: (Optional[Text]) -> Optional[GitHubChecksOutputter]
+def get_gh_checks_outputter(filepath: Optional[Text]) -> Optional[GitHubChecksOutputter]:
"""Return the outputter for GitHub Checks output, if enabled.
:param filepath: The filepath to write GitHub Check output information to,
diff --git a/tests/wpt/web-platform-tests/tools/docker/requirements.txt b/tests/wpt/web-platform-tests/tools/docker/requirements.txt
index 7c45f769eea..fee00749e85 100644
--- a/tests/wpt/web-platform-tests/tools/docker/requirements.txt
+++ b/tests/wpt/web-platform-tests/tools/docker/requirements.txt
@@ -1,2 +1,2 @@
pyyaml==6.0
-requests==2.29.0
+requests==2.30.0
diff --git a/tests/wpt/web-platform-tests/tools/gitignore/gitignore.py b/tests/wpt/web-platform-tests/tools/gitignore/gitignore.py
index 2e41a9fc655..68c2a0835ec 100644
--- a/tests/wpt/web-platform-tests/tools/gitignore/gitignore.py
+++ b/tests/wpt/web-platform-tests/tools/gitignore/gitignore.py
@@ -2,32 +2,18 @@ import re
import os
import itertools
from collections import defaultdict
+from typing import (Any, Dict, Iterable, List, MutableMapping, Optional, Pattern, Tuple, TypeVar,
+ Union, cast)
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Dict
- from typing import Iterable
- from typing import List
- from typing import MutableMapping
- from typing import Optional
- from typing import Pattern
- from typing import Tuple
- from typing import TypeVar
- from typing import Union
- from typing import cast
-
- T = TypeVar('T')
+T = TypeVar('T')
end_space = re.compile(r"([^\\]\s)*$")
-def fnmatch_translate(pat):
- # type: (bytes) -> Tuple[bool, Pattern[bytes]]
+def fnmatch_translate(pat: bytes) -> Tuple[bool, Pattern[bytes]]:
parts = []
- seq = None # type: Optional[int]
+ seq: Optional[int] = None
i = 0
any_char = b"[^/]"
if pat[0:1] == b"/":
@@ -112,8 +98,7 @@ def fnmatch_translate(pat):
pattern_re = re.compile(br".*[\*\[\?]")
-def parse_line(line):
- # type: (bytes) -> Optional[Tuple[bool, bool, bool, Union[Tuple[bytes, ...], Tuple[bool, Pattern[bytes]]]]]
+def parse_line(line: bytes) -> Optional[Tuple[bool, bool, bool, Union[Tuple[bytes, ...], Tuple[bool, Pattern[bytes]]]]]:
line = line.rstrip()
if not line or line[0:1] == b"#":
return None
@@ -130,7 +115,7 @@ def parse_line(line):
# Could make a special case for **/foo, but we don't have any patterns like that
if not invert and not pattern_re.match(line):
literal = True
- pattern = tuple(line.rsplit(b"/", 1)) # type: Union[Tuple[bytes, ...], Tuple[bool, Pattern[bytes]]]
+ pattern: Union[Tuple[bytes, ...], Tuple[bool, Pattern[bytes]]] = tuple(line.rsplit(b"/", 1))
else:
pattern = fnmatch_translate(line)
literal = False
@@ -139,10 +124,9 @@ def parse_line(line):
class PathFilter:
- def __init__(self, root, extras=None, cache=None):
- # type: (bytes, Optional[List[bytes]], Optional[MutableMapping[bytes, bool]]) -> None
+ def __init__(self, root: bytes, extras: Optional[List[bytes]] = None, cache: Optional[MutableMapping[bytes, bool]] = None) -> None:
if root:
- ignore_path = os.path.join(root, b".gitignore") # type: Optional[bytes]
+ ignore_path: Optional[bytes] = os.path.join(root, b".gitignore")
else:
ignore_path = None
if not ignore_path and not extras:
@@ -150,26 +134,25 @@ class PathFilter:
return
self.trivial = False
- self.literals_file = defaultdict(dict) # type: Dict[Optional[bytes], Dict[bytes, List[Tuple[bool, Pattern[bytes]]]]]
- self.literals_dir = defaultdict(dict) # type: Dict[Optional[bytes], Dict[bytes, List[Tuple[bool, Pattern[bytes]]]]]
- self.patterns_file = [] # type: List[Tuple[Tuple[bool, Pattern[bytes]], List[Tuple[bool, Pattern[bytes]]]]]
- self.patterns_dir = [] # type: List[Tuple[Tuple[bool, Pattern[bytes]], List[Tuple[bool, Pattern[bytes]]]]]
+ self.literals_file: Dict[Optional[bytes], Dict[bytes, List[Tuple[bool, Pattern[bytes]]]]] = defaultdict(dict)
+ self.literals_dir: Dict[Optional[bytes], Dict[bytes, List[Tuple[bool, Pattern[bytes]]]]] = defaultdict(dict)
+ self.patterns_file: List[Tuple[Tuple[bool, Pattern[bytes]], List[Tuple[bool, Pattern[bytes]]]]] = []
+ self.patterns_dir: List[Tuple[Tuple[bool, Pattern[bytes]], List[Tuple[bool, Pattern[bytes]]]]] = []
if cache is None:
cache = {}
- self.cache = cache # type: MutableMapping[bytes, bool]
+ self.cache: MutableMapping[bytes, bool] = cache
if extras is None:
extras = []
if ignore_path and os.path.exists(ignore_path):
- args = ignore_path, extras # type: Tuple[Optional[bytes], List[bytes]]
+ args: Tuple[Optional[bytes], List[bytes]] = (ignore_path, extras)
else:
args = None, extras
self._read_ignore(*args)
- def _read_ignore(self, ignore_path, extras):
- # type: (Optional[bytes], List[bytes]) -> None
+ def _read_ignore(self, ignore_path: Optional[bytes], extras: List[bytes]) -> None:
if ignore_path is not None:
with open(ignore_path, "rb") as f:
for line in f:
@@ -177,8 +160,7 @@ class PathFilter:
for line in extras:
self._read_line(line)
- def _read_line(self, line):
- # type: (bytes) -> None
+ def _read_line(self, line: bytes) -> None:
parsed = parse_line(line)
if not parsed:
return
@@ -189,14 +171,13 @@ class PathFilter:
# that we can match patterns out of order and check if they were later
# overriden by an exclude rule
assert not literal
- if MYPY:
- rule = cast(Tuple[bool, Pattern[bytes]], rule)
+ rule = cast(Tuple[bool, Pattern[bytes]], rule)
if not dir_only:
- rules_iter = itertools.chain(
+ rules_iter: Iterable[Tuple[Any, List[Tuple[bool, Pattern[bytes]]]]] = itertools.chain(
itertools.chain(*(item.items() for item in self.literals_dir.values())),
itertools.chain(*(item.items() for item in self.literals_file.values())),
self.patterns_dir,
- self.patterns_file) # type: Iterable[Tuple[Any, List[Tuple[bool, Pattern[bytes]]]]]
+ self.patterns_file)
else:
rules_iter = itertools.chain(
itertools.chain(*(item.items() for item in self.literals_dir.values())),
@@ -206,8 +187,7 @@ class PathFilter:
rules[1].append(rule)
else:
if literal:
- if MYPY:
- rule = cast(Tuple[bytes, ...], rule)
+ rule = cast(Tuple[bytes, ...], rule)
if len(rule) == 1:
dir_name, pattern = None, rule[0] # type: Tuple[Optional[bytes], bytes]
else:
@@ -216,25 +196,23 @@ class PathFilter:
if not dir_only:
self.literals_file[dir_name][pattern] = []
else:
- if MYPY:
- rule = cast(Tuple[bool, Pattern[bytes]], rule)
+ rule = cast(Tuple[bool, Pattern[bytes]], rule)
self.patterns_dir.append((rule, []))
if not dir_only:
self.patterns_file.append((rule, []))
def filter(self,
- iterator # type: Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
- ):
- # type: (...) -> Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
- empty = {} # type: Dict[Any, Any]
+ iterator: Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
+ ) -> Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]:
+ empty: Dict[Any, Any] = {}
for dirpath, dirnames, filenames in iterator:
orig_dirpath = dirpath
path_sep = os.path.sep.encode()
if path_sep != b"/":
dirpath = dirpath.replace(path_sep, b"/")
- keep_dirs = [] # type: List[Tuple[bytes, T]]
- keep_files = [] # type: List[Tuple[bytes, T]]
+ keep_dirs: List[Tuple[bytes, T]] = []
+ keep_files: List[Tuple[bytes, T]] = []
for iter_items, literals, patterns, target, suffix in [
(dirnames, self.literals_dir, self.patterns_dir, keep_dirs, b"/"),
@@ -278,15 +256,13 @@ class PathFilter:
yield orig_dirpath, dirnames, keep_files
def __call__(self,
- iterator # type: Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
- ):
- # type: (...) -> Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
+ iterator: Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]
+ ) -> Iterable[Tuple[bytes, List[Tuple[bytes, T]], List[Tuple[bytes, T]]]]:
if self.trivial:
return iterator
return self.filter(iterator)
-def has_ignore(dirpath):
- # type: (bytes) -> bool
+def has_ignore(dirpath: bytes) -> bool:
return os.path.exists(os.path.join(dirpath, b".gitignore"))
diff --git a/tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py b/tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
index fa7c915d2b5..61ad9fdc4e5 100644
--- a/tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
+++ b/tests/wpt/web-platform-tests/tools/gitignore/tests/test_gitignore.py
@@ -1,17 +1,12 @@
# mypy: allow-untyped-defs
+from typing import Iterable, Sequence, Tuple
import pytest
from ..gitignore import fnmatch_translate, PathFilter
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Tuple
- from typing import Iterable
- from typing import Sequence
-match_data = [
+match_data: Sequence[Tuple[bytes, bool, Iterable[bytes]]] = [
(b"foo", True, [b"a/foo", b"foo"]),
(b"*.a", True, [b"foo.a", b"a/foo.a", b"a/b/foo.a", b"a.a/foo.a"]),
(b"*.py[co]", True, [b"a.pyc", b"a.pyo", b"a/b/c.pyc"]),
@@ -29,9 +24,9 @@ match_data = [
(b"a[^b]c", True, [b"acc"]),
(b"a[b-c]c", True, [b"abc", b"acc"]),
(b"a[]c", True, [b"ac"]),
-] # type: Sequence[Tuple[bytes, bool, Iterable[bytes]]]
+]
-mismatch_data = [
+mismatch_data: Sequence[Tuple[bytes, bool, Iterable[bytes]]] = [
(b"foo", True, [b"foob", b"afoo"]),
(b"*.a", True, [b"a", b"foo:a", b"a.a/foo"]),
(b"*.py[co]", True, [b"a.pyd", b"pyo", b"a.py"]),
@@ -39,7 +34,7 @@ mismatch_data = [
(b"a?c", True, [b"ac", b"abbc"]),
(b"a[^b]c", True, [b"abc"]),
(b"a[b-c]c", True, [b"adc"]),
-] # type: Sequence[Tuple[bytes, bool, Iterable[bytes]]]
+]
invalid_data = [
b"[a",
@@ -66,8 +61,7 @@ filter_data = [
]
-def expand_data(compact_data):
- # type: (Sequence[Tuple[bytes, bool, Iterable[bytes]]]) -> Iterable[Tuple[bytes, bool, bytes]]
+def expand_data(compact_data: Sequence[Tuple[bytes, bool, Iterable[bytes]]]) -> Iterable[Tuple[bytes, bool, bytes]]:
for pattern, name_only, inputs in compact_data:
for input in inputs:
yield pattern, name_only, input
diff --git a/tests/wpt/web-platform-tests/tools/lint/fnmatch.py b/tests/wpt/web-platform-tests/tools/lint/fnmatch.py
index 143cb436f2c..4148ed75a90 100644
--- a/tests/wpt/web-platform-tests/tools/lint/fnmatch.py
+++ b/tests/wpt/web-platform-tests/tools/lint/fnmatch.py
@@ -1,26 +1,18 @@
import fnmatch as _stdlib_fnmatch
import os
-
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Iterable
- from typing import List
- from typing import Text
+from typing import Iterable, List, Text
__all__ = ["fnmatch", "fnmatchcase", "filter", "translate"]
-def fnmatch(name, pat):
- # type: (Text, Text) -> bool
+def fnmatch(name: Text, pat: Text) -> bool:
name = os.path.normcase(name)
pat = os.path.normcase(pat)
return fnmatchcase(name, pat)
-def fnmatchcase(name, pat):
- # type: (Text, Text) -> bool
+def fnmatchcase(name: Text, pat: Text) -> bool:
if '?' not in pat and '[' not in pat:
wildcards = pat.count("*")
if wildcards == 0:
@@ -32,8 +24,7 @@ def fnmatchcase(name, pat):
return _stdlib_fnmatch.fnmatchcase(name, pat)
-def filter(names, pat):
- # type: (Iterable[Text], Text) -> List[Text]
+def filter(names: Iterable[Text], pat: Text) -> List[Text]:
return [n for n in names if fnmatch(n, pat)]
diff --git a/tests/wpt/web-platform-tests/tools/lint/lint.py b/tests/wpt/web-platform-tests/tools/lint/lint.py
index fbc663417fa..9fc78d9b68e 100644
--- a/tests/wpt/web-platform-tests/tools/lint/lint.py
+++ b/tests/wpt/web-platform-tests/tools/lint/lint.py
@@ -9,10 +9,17 @@ import re
import subprocess
import sys
import tempfile
-
from collections import defaultdict
+from typing import (Any, Callable, Dict, IO, Iterable, List, Optional, Sequence, Set, Text, Tuple,
+ Type, TypeVar)
+
from urllib.parse import urlsplit, urljoin
+try:
+ from xml.etree import cElementTree as ElementTree
+except ImportError:
+ from xml.etree import ElementTree as ElementTree # type: ignore
+
from . import fnmatch
from . import rules
from .. import localpaths
@@ -23,48 +30,26 @@ from ..manifest.vcs import walk
from ..manifest.sourcefile import SourceFile, js_meta_re, python_meta_re, space_chars, get_any_variants
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Callable
- from typing import Dict
- from typing import IO
- from typing import Iterable
- from typing import List
- from typing import Optional
- from typing import Sequence
- from typing import Set
- from typing import Text
- from typing import Tuple
- from typing import Type
- from typing import TypeVar
-
- # The Ignorelist is a two level dictionary. The top level is indexed by
- # error names (e.g. 'TRAILING WHITESPACE'). Each of those then has a map of
- # file patterns (e.g. 'foo/*') to a set of specific line numbers for the
- # exception. The line numbers are optional; if missing the entire file
- # ignores the error.
- Ignorelist = Dict[str, Dict[str, Set[Optional[int]]]]
-
- # Define an arbitrary typevar
- T = TypeVar("T")
- try:
- from xml.etree import cElementTree as ElementTree
- except ImportError:
- from xml.etree import ElementTree as ElementTree # type: ignore
+# The Ignorelist is a two level dictionary. The top level is indexed by
+# error names (e.g. 'TRAILING WHITESPACE'). Each of those then has a map of
+# file patterns (e.g. 'foo/*') to a set of specific line numbers for the
+# exception. The line numbers are optional; if missing the entire file
+# ignores the error.
+Ignorelist = Dict[str, Dict[str, Set[Optional[int]]]]
+
+# Define an arbitrary typevar
+T = TypeVar("T")
-logger = None # type: Optional[logging.Logger]
+logger: Optional[logging.Logger] = None
-def setup_logging(prefix=False):
- # type: (bool) -> None
+def setup_logging(prefix: bool = False) -> None:
global logger
if logger is None:
logger = logging.getLogger(os.path.basename(os.path.splitext(__file__)[0]))
- handler = logging.StreamHandler(sys.stdout) # type: logging.Handler
+ handler: logging.Handler = logging.StreamHandler(sys.stdout)
# Only add a handler if the parent logger is missing a handler
parent = logger.parent
assert isinstance(parent, logging.Logger)
@@ -98,8 +83,7 @@ you could add the following line to the lint.ignore file.
%s: %s"""
-def all_filesystem_paths(repo_root, subdir=None):
- # type: (Text, Optional[Text]) -> Iterable[Text]
+def all_filesystem_paths(repo_root: Text, subdir: Optional[Text] = None) -> Iterable[Text]:
path_filter = PathFilter(repo_root.encode("utf8"),
extras=[b".git/"])
if subdir:
@@ -116,8 +100,7 @@ def all_filesystem_paths(repo_root, subdir=None):
yield path.decode("utf8")
-def _all_files_equal(paths):
- # type: (Iterable[Text]) -> bool
+def _all_files_equal(paths: Iterable[Text]) -> bool:
"""
Checks all the paths are files that are byte-for-byte identical
@@ -155,22 +138,19 @@ def _all_files_equal(paths):
return True
-def check_path_length(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_path_length(repo_root: Text, path: Text) -> List[rules.Error]:
if len(path) + 1 > 150:
return [rules.PathLength.error(path, (path, len(path) + 1))]
return []
-def check_file_type(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_file_type(repo_root: Text, path: Text) -> List[rules.Error]:
if os.path.islink(path):
return [rules.FileType.error(path, (path, "symlink"))]
return []
-def check_worker_collision(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_worker_collision(repo_root: Text, path: Text) -> List[rules.Error]:
endings = [(".any.html", ".any.js"),
(".any.worker.html", ".any.js"),
(".worker.html", ".worker.js")]
@@ -180,8 +160,7 @@ def check_worker_collision(repo_root, path):
return []
-def check_gitignore_file(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_gitignore_file(repo_root: Text, path: Text) -> List[rules.Error]:
if not path.endswith(".gitignore"):
return []
@@ -199,23 +178,20 @@ def check_gitignore_file(repo_root, path):
return [rules.GitIgnoreFile.error(path)]
-def check_mojom_js(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_mojom_js(repo_root: Text, path: Text) -> List[rules.Error]:
if path.endswith(".mojom.js"):
return [rules.MojomJSFile.error(path)]
return []
-def check_ahem_copy(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_ahem_copy(repo_root: Text, path: Text) -> List[rules.Error]:
lpath = path.lower()
if "ahem" in lpath and lpath.endswith(".ttf"):
return [rules.AhemCopy.error(path)]
return []
-def check_tentative_directories(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_tentative_directories(repo_root: Text, path: Text) -> List[rules.Error]:
path_parts = path.split(os.path.sep)
for directory in path_parts[:-1]:
if "tentative" in directory and directory != "tentative":
@@ -223,8 +199,7 @@ def check_tentative_directories(repo_root, path):
return []
-def check_git_ignore(repo_root, paths):
- # type: (Text, List[Text]) -> List[rules.Error]
+def check_git_ignore(repo_root: Text, paths: List[Text]) -> List[rules.Error]:
errors = []
with tempfile.TemporaryFile('w+', newline='') as f:
@@ -253,8 +228,7 @@ w3c_tr_re = re.compile(r"https?\:\/\/www\.w3c?\.org\/TR\/([^/?#]+)")
w3c_dev_re = re.compile(r"https?\:\/\/dev\.w3c?\.org\/[^/?#]+\/([^/?#]+)")
-def check_unique_testharness_basenames(repo_root, paths):
- # type: (Text, List[Text]) -> List[rules.Error]
+def check_unique_testharness_basenames(repo_root: Text, paths: List[Text]) -> List[rules.Error]:
"""
Checks that all testharness files have unique basename paths.
@@ -288,9 +262,8 @@ def check_unique_testharness_basenames(repo_root, paths):
return errors
-def check_unique_case_insensitive_paths(repo_root, paths):
- # type: (Text, List[Text]) -> List[rules.Error]
- seen = {} # type: Dict[Text, Text]
+def check_unique_case_insensitive_paths(repo_root: Text, paths: List[Text]) -> List[rules.Error]:
+ seen: Dict[Text, Text] = {}
errors = []
for path in paths:
lower_path = path.lower()
@@ -302,8 +275,7 @@ def check_unique_case_insensitive_paths(repo_root, paths):
return errors
-def parse_ignorelist(f):
- # type: (IO[Text]) -> Tuple[Ignorelist, Set[Text]]
+def parse_ignorelist(f: IO[Text]) -> Tuple[Ignorelist, Set[Text]]:
"""
Parse the ignorelist file given by `f`, and return the parsed structure.
@@ -311,8 +283,8 @@ def parse_ignorelist(f):
skipped by the linter (i.e. have a '*' entry).
"""
- data = defaultdict(lambda:defaultdict(set)) # type: Ignorelist
- skipped_files = set() # type: Set[Text]
+ data: Ignorelist = defaultdict(lambda:defaultdict(set))
+ skipped_files: Set[Text] = set()
for line in f:
line = line.strip()
@@ -322,7 +294,7 @@ def parse_ignorelist(f):
if len(parts) == 2:
error_types_s, file_match = parts
- line_number = None # type: Optional[int]
+ line_number: Optional[int] = None
else:
error_types_s, file_match, line_number_s = parts
line_number = int(line_number_s)
@@ -339,8 +311,7 @@ def parse_ignorelist(f):
return data, skipped_files
-def filter_ignorelist_errors(data, errors):
- # type: (Ignorelist, Sequence[rules.Error]) -> List[rules.Error]
+def filter_ignorelist_errors(data: Ignorelist, errors: Sequence[rules.Error]) -> List[rules.Error]:
"""
Filter out those errors that are ignored in `data`.
"""
@@ -383,9 +354,8 @@ regexps = [item() for item in # type: ignore
rules.AssertPreconditionRegexp]]
-def check_regexp_line(repo_root, path, f):
- # type: (Text, Text, IO[bytes]) -> List[rules.Error]
- errors = [] # type: List[rules.Error]
+def check_regexp_line(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]:
+ errors: List[rules.Error] = []
applicable_regexps = [regexp for regexp in regexps if regexp.applies(path)]
@@ -397,11 +367,10 @@ def check_regexp_line(repo_root, path, f):
return errors
-def check_parsed(repo_root, path, f):
- # type: (Text, Text, IO[bytes]) -> List[rules.Error]
+def check_parsed(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]:
source_file = SourceFile(repo_root, path, "/", contents=f.read())
- errors = [] # type: List[rules.Error]
+ errors: List[rules.Error] = []
if path.startswith("css/"):
if (source_file.type != "support" and
@@ -462,9 +431,9 @@ def check_parsed(repo_root, path, f):
if timeout_value != "long":
errors.append(rules.InvalidTimeout.error(path, (timeout_value,)))
- required_elements = [] # type: List[Text]
+ required_elements: List[Text] = []
- testharnessreport_nodes = [] # type: List[ElementTree.Element]
+ testharnessreport_nodes: List[ElementTree.Element] = []
if source_file.testharness_nodes:
test_type = source_file.manifest_items()[0]
if test_type not in ("testharness", "manual"):
@@ -495,7 +464,7 @@ def check_parsed(repo_root, path, f):
"timeout": len(source_file.timeout_nodes) > 0}.items()
if value)
- testdriver_vendor_nodes = [] # type: List[ElementTree.Element]
+ testdriver_vendor_nodes: List[ElementTree.Element] = []
if source_file.testdriver_nodes:
if len(source_file.testdriver_nodes) > 1:
errors.append(rules.MultipleTestdriver.error(path))
@@ -542,8 +511,7 @@ def check_parsed(repo_root, path, f):
for element in source_file.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src]"):
src = element.attrib["src"]
- def incorrect_path(script, src):
- # type: (Text, Text) -> bool
+ def incorrect_path(script: Text, src: Text) -> bool:
return (script == src or
("/%s" % script in src and src != "/resources/%s" % script))
@@ -573,20 +541,17 @@ def check_parsed(repo_root, path, f):
class ASTCheck(metaclass=abc.ABCMeta):
@abc.abstractproperty
- def rule(self):
- # type: () -> Type[rules.Rule]
+ def rule(self) -> Type[rules.Rule]:
pass
@abc.abstractmethod
- def check(self, root):
- # type: (ast.AST) -> List[int]
+ def check(self, root: ast.AST) -> List[int]:
pass
class OpenModeCheck(ASTCheck):
rule = rules.OpenNoMode
- def check(self, root):
- # type: (ast.AST) -> List[int]
+ def check(self, root: ast.AST) -> List[int]:
errors = []
for node in ast.walk(root):
if isinstance(node, ast.Call):
@@ -598,8 +563,7 @@ class OpenModeCheck(ASTCheck):
ast_checkers = [item() for item in [OpenModeCheck]]
-def check_python_ast(repo_root, path, f):
- # type: (Text, Text, IO[bytes]) -> List[rules.Error]
+def check_python_ast(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]:
if not path.endswith(".py"):
return []
@@ -619,8 +583,7 @@ broken_js_metadata = re.compile(br"//\s*META:")
broken_python_metadata = re.compile(br"#\s*META:")
-def check_global_metadata(value):
- # type: (bytes) -> Iterable[Tuple[Type[rules.Rule], Tuple[Any, ...]]]
+def check_global_metadata(value: bytes) -> Iterable[Tuple[Type[rules.Rule], Tuple[Any, ...]]]:
global_values = {item.strip().decode("utf8") for item in value.split(b",") if item.strip()}
# TODO: this could check for duplicates and such
@@ -629,8 +592,7 @@ def check_global_metadata(value):
yield (rules.UnknownGlobalMetadata, ())
-def check_script_metadata(repo_root, path, f):
- # type: (Text, Text, IO[bytes]) -> List[rules.Error]
+def check_script_metadata(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]:
if path.endswith((".worker.js", ".any.js")):
meta_re = js_meta_re
broken_metadata = broken_js_metadata
@@ -680,8 +642,7 @@ ahem_stylesheet_re = re.compile(br"\/fonts\/ahem\.css|support\/ahem.css",
flags=re.IGNORECASE)
-def check_ahem_system_font(repo_root, path, f):
- # type: (Text, Text, IO[bytes]) -> List[rules.Error]
+def check_ahem_system_font(repo_root: Text, path: Text, f: IO[bytes]) -> List[rules.Error]:
if not path.endswith((".html", ".htm", ".xht", ".xhtml")):
return []
contents = f.read()
@@ -691,8 +652,7 @@ def check_ahem_system_font(repo_root, path, f):
return errors
-def check_path(repo_root, path):
- # type: (Text, Text) -> List[rules.Error]
+def check_path(repo_root: Text, path: Text) -> List[rules.Error]:
"""
Runs lints that check the file path.
@@ -707,8 +667,7 @@ def check_path(repo_root, path):
return errors
-def check_all_paths(repo_root, paths):
- # type: (Text, List[Text]) -> List[rules.Error]
+def check_all_paths(repo_root: Text, paths: List[Text]) -> List[rules.Error]:
"""
Runs lints that check all paths globally.
@@ -723,8 +682,7 @@ def check_all_paths(repo_root, paths):
return errors
-def check_file_contents(repo_root, path, f=None):
- # type: (Text, Text, Optional[IO[bytes]]) -> List[rules.Error]
+def check_file_contents(repo_root: Text, path: Text, f: Optional[IO[bytes]] = None) -> List[rules.Error]:
"""
Runs lints that check the file contents.
@@ -743,13 +701,11 @@ def check_file_contents(repo_root, path, f=None):
return errors
-def check_file_contents_apply(args):
- # type: (Tuple[Text, Text]) -> List[rules.Error]
+def check_file_contents_apply(args: Tuple[Text, Text]) -> List[rules.Error]:
return check_file_contents(*args)
-def output_errors_text(log, errors):
- # type: (Callable[[Any], None], List[rules.Error]) -> None
+def output_errors_text(log: Callable[[Any], None], errors: List[rules.Error]) -> None:
for error_type, description, path, line_number in errors:
pos_string = path
if line_number:
@@ -757,8 +713,7 @@ def output_errors_text(log, errors):
log(f"{pos_string}: {description} ({error_type})")
-def output_errors_markdown(log, errors):
- # type: (Callable[[Any], None], List[rules.Error]) -> None
+def output_errors_markdown(log: Callable[[Any], None], errors: List[rules.Error]) -> None:
if not errors:
return
heading = """Got lint errors:
@@ -774,8 +729,7 @@ def output_errors_markdown(log, errors):
log(f"{error_type} | {pos_string} | {description} |")
-def output_errors_json(log, errors):
- # type: (Callable[[Any], None], List[rules.Error]) -> None
+def output_errors_json(log: Callable[[Any], None], errors: List[rules.Error]) -> None:
for error_type, error, path, line_number in errors:
# We use 'print' rather than the log function to ensure that the output
# is valid JSON (e.g. with no logger preamble).
@@ -783,8 +737,7 @@ def output_errors_json(log, errors):
"rule": error_type, "message": error}))
-def output_errors_github_checks(outputter, errors, first_reported):
- # type: (GitHubChecksOutputter, List[rules.Error], bool) -> None
+def output_errors_github_checks(outputter: GitHubChecksOutputter, errors: List[rules.Error], first_reported: bool) -> None:
"""Output errors to the GitHub Checks output markdown format.
:param outputter: the GitHub Checks outputter
@@ -803,8 +756,7 @@ def output_errors_github_checks(outputter, errors, first_reported):
output_errors_text(outputter.output, errors)
-def output_error_count(error_count):
- # type: (Dict[Text, int]) -> None
+def output_error_count(error_count: Dict[Text, int]) -> None:
if not error_count:
return
@@ -818,15 +770,13 @@ def output_error_count(error_count):
logger.info("There were %d errors (%s)" % (count, by_type))
-def changed_files(wpt_root):
- # type: (Text) -> List[Text]
+def changed_files(wpt_root: Text) -> List[Text]:
revish = testfiles.get_revish(revish=None)
changed, _ = testfiles.files_changed(revish, None, include_uncommitted=True, include_new=True)
return [os.path.relpath(item, wpt_root) for item in changed]
-def lint_paths(kwargs, wpt_root):
- # type: (Dict[Text, Any], Text) -> List[Text]
+def lint_paths(kwargs: Dict[Text, Any], wpt_root: Text) -> List[Text]:
if kwargs.get("paths"):
paths = []
for path in kwargs.get("paths", []):
@@ -861,8 +811,7 @@ def lint_paths(kwargs, wpt_root):
return paths
-def create_parser():
- # type: () -> argparse.ArgumentParser
+def create_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument("paths", nargs="*",
help="List of paths to lint")
@@ -887,8 +836,7 @@ def create_parser():
return parser
-def main(**kwargs):
- # type: (**Any) -> int
+def main(**kwargs: Any) -> int:
assert logger is not None
if kwargs.get("json") and kwargs.get("markdown"):
@@ -919,9 +867,13 @@ def main(**kwargs):
MIN_FILES_FOR_PARALLEL = 80
-def lint(repo_root, paths, output_format, ignore_glob=None, github_checks_outputter=None, jobs=0):
- # type: (Text, List[Text], Text, Optional[List[Text]], Optional[GitHubChecksOutputter], int) -> int
- error_count = defaultdict(int) # type: Dict[Text, int]
+def lint(repo_root: Text,
+ paths: List[Text],
+ output_format: Text,
+ ignore_glob: Optional[List[Text]] = None,
+ github_checks_outputter: Optional[GitHubChecksOutputter] = None,
+ jobs: int = 0) -> int:
+ error_count: Dict[Text, int] = defaultdict(int)
last = None
if jobs == 0:
@@ -942,8 +894,7 @@ def lint(repo_root, paths, output_format, ignore_glob=None, github_checks_output
"markdown": output_errors_markdown,
"normal": output_errors_text}[output_format]
- def process_errors(errors):
- # type: (List[rules.Error]) -> Optional[Tuple[Text, Text]]
+ def process_errors(errors: List[rules.Error]) -> Optional[Tuple[Text, Text]]:
"""
Filters and prints the errors, and updates the ``error_count`` object.
diff --git a/tests/wpt/web-platform-tests/tools/lint/rules.py b/tests/wpt/web-platform-tests/tools/lint/rules.py
index d5876cdc269..88b7b6d80c3 100644
--- a/tests/wpt/web-platform-tests/tools/lint/rules.py
+++ b/tests/wpt/web-platform-tests/tools/lint/rules.py
@@ -2,42 +2,30 @@ import abc
import inspect
import os
import re
+from typing import Any, List, Match, Optional, Pattern, Text, Tuple, cast
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any, List, Match, Optional, Pattern, Text, Tuple, cast
- Error = Tuple[str, str, str, Optional[int]]
+Error = Tuple[str, str, str, Optional[int]]
-def collapse(text):
- # type: (Text) -> Text
+def collapse(text: Text) -> Text:
return inspect.cleandoc(str(text)).replace("\n", " ")
class Rule(metaclass=abc.ABCMeta):
@abc.abstractproperty
- def name(self):
- # type: () -> Text
+ def name(self) -> Text:
pass
@abc.abstractproperty
- def description(self):
- # type: () -> Text
+ def description(self) -> Text:
pass
- to_fix = None # type: Optional[Text]
+ to_fix: Optional[Text] = None
@classmethod
- def error(cls, path, context=(), line_no=None):
- # type: (Text, Tuple[Any, ...], Optional[int]) -> Error
- if MYPY:
- name = cast(str, cls.name)
- description = cast(str, cls.description)
- else:
- name = cls.name
- description = cls.description
- description = description % context
+ def error(cls, path: Text, context: Tuple[Any, ...] = (), line_no: Optional[int] = None) -> Error:
+ name = cast(str, cls.name)
+ description = cast(str, cls.description) % context
return (name, description, path, line_no)
@@ -353,33 +341,27 @@ class TentativeDirectoryName(Rule):
class Regexp(metaclass=abc.ABCMeta):
@abc.abstractproperty
- def pattern(self):
- # type: () -> bytes
+ def pattern(self) -> bytes:
pass
@abc.abstractproperty
- def name(self):
- # type: () -> Text
+ def name(self) -> Text:
pass
@abc.abstractproperty
- def description(self):
- # type: () -> Text
+ def description(self) -> Text:
pass
- file_extensions = None # type: Optional[List[Text]]
+ file_extensions: Optional[List[Text]] = None
- def __init__(self):
- # type: () -> None
- self._re = re.compile(self.pattern) # type: Pattern[bytes]
+ def __init__(self) -> None:
+ self._re: Pattern[bytes] = re.compile(self.pattern)
- def applies(self, path):
- # type: (Text) -> bool
+ def applies(self, path: Text) -> bool:
return (self.file_extensions is None or
os.path.splitext(path)[1] in self.file_extensions)
- def search(self, line):
- # type: (bytes) -> Optional[Match[bytes]]
+ def search(self, line: bytes) -> Optional[Match[bytes]]:
return self._re.search(line)
diff --git a/tests/wpt/web-platform-tests/tools/manifest/XMLParser.py b/tests/wpt/web-platform-tests/tools/manifest/XMLParser.py
index 21be8a26cd3..8dcdb450072 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/XMLParser.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/XMLParser.py
@@ -1,31 +1,20 @@
-from os.path import dirname, join
-
from collections import OrderedDict
-
+from typing import Dict, List, Optional, Text, Union
+from os.path import dirname, join
from xml.parsers import expat
import xml.etree.ElementTree as etree # noqa: N813
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Dict
- from typing import List
- from typing import Optional
- from typing import Text
- from typing import Union
_catalog = join(dirname(__file__), "catalog")
-def _wrap_error(e):
- # type: (expat.error) -> etree.ParseError
+def _wrap_error(e: expat.error) -> etree.ParseError:
err = etree.ParseError(e)
err.code = e.code
err.position = e.lineno, e.offset
raise err
-_names = {} # type: Dict[Text, Text]
-def _fixname(key):
- # type: (Text) -> Text
+_names: Dict[Text, Text] = {}
+def _fixname(key: Text) -> Text:
try:
name = _names[key]
except KeyError:
@@ -36,7 +25,7 @@ def _fixname(key):
return name
-_undefined_entity_code = expat.errors.codes[expat.errors.XML_ERROR_UNDEFINED_ENTITY] # type: int
+_undefined_entity_code: int = expat.errors.codes[expat.errors.XML_ERROR_UNDEFINED_ENTITY]
class XMLParser:
@@ -48,8 +37,7 @@ class XMLParser:
(therefore allowing XHTML entities) and supports all encodings
Python does, rather than just those supported by expat.
"""
- def __init__(self, encoding=None):
- # type: (Optional[Text]) -> None
+ def __init__(self, encoding: Optional[Text] = None) -> None:
self._parser = expat.ParserCreate(encoding, "}")
self._target = etree.TreeBuilder()
# parser settings
@@ -64,34 +52,29 @@ class XMLParser:
self._parser.ExternalEntityRefHandler = self._external
self._parser.SkippedEntityHandler = self._skipped
# used for our horrible re-encoding hack
- self._fed_data = [] # type: Optional[List[bytes]]
- self._read_encoding = None # type: Optional[Text]
+ self._fed_data: Optional[List[bytes]] = []
+ self._read_encoding: Optional[Text] = None
- def _xml_decl(self, version, encoding, standalone):
- # type: (Text, Optional[Text], int) -> None
+ def _xml_decl(self, version: Text, encoding: Optional[Text], standalone: int) -> None:
self._read_encoding = encoding
- def _start(self, tag, attrib_in):
- # type: (Text, List[str]) -> etree.Element
+ def _start(self, tag: Text, attrib_in: List[str]) -> etree.Element:
assert isinstance(tag, str)
self._fed_data = None
tag = _fixname(tag)
- attrib = OrderedDict() # type: Dict[Union[bytes, Text], Union[bytes, Text]]
+ attrib: Dict[Union[bytes, Text], Union[bytes, Text]] = OrderedDict()
if attrib_in:
for i in range(0, len(attrib_in), 2):
attrib[_fixname(attrib_in[i])] = attrib_in[i+1]
return self._target.start(tag, attrib)
- def _data(self, text):
- # type: (Text) -> None
+ def _data(self, text: Text) -> None:
self._target.data(text)
- def _end(self, tag):
- # type: (Text) -> etree.Element
+ def _end(self, tag: Text) -> etree.Element:
return self._target.end(_fixname(tag))
- def _external(self, context, base, system_id, public_id):
- # type: (Text, Optional[Text], Optional[Text], Optional[Text]) -> bool
+ def _external(self, context: Text, base: Optional[Text], system_id: Optional[Text], public_id: Optional[Text]) -> bool:
if public_id in {
"-//W3C//DTD XHTML 1.0 Transitional//EN",
"-//W3C//DTD XHTML 1.1//EN",
@@ -112,8 +95,7 @@ class XMLParser:
return True
- def _skipped(self, name, is_parameter_entity):
- # type: (Text, bool) -> None
+ def _skipped(self, name: Text, is_parameter_entity: bool) -> None:
err = expat.error("undefined entity %s: line %d, column %d" %
(name, self._parser.ErrorLineNumber,
self._parser.ErrorColumnNumber))
@@ -122,8 +104,7 @@ class XMLParser:
err.offset = self._parser.ErrorColumnNumber
raise err
- def feed(self, data):
- # type: (bytes) -> None
+ def feed(self, data: bytes) -> None:
if self._fed_data is not None:
self._fed_data.append(data)
try:
@@ -141,8 +122,7 @@ class XMLParser:
self._fed_data = None
self.feed(xml)
- def close(self):
- # type: () -> etree.Element
+ def close(self) -> etree.Element:
try:
self._parser.Parse("", True)
except expat.error as v:
diff --git a/tests/wpt/web-platform-tests/tools/manifest/download.py b/tests/wpt/web-platform-tests/tools/manifest/download.py
index 4a8b6fc3473..8527fb232ac 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/download.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/download.py
@@ -5,6 +5,7 @@ import json
import io
import os
from datetime import datetime, timedelta
+from typing import Any, Callable, List, Optional, Text
from urllib.request import urlopen
try:
@@ -16,14 +17,6 @@ from .utils import git
from . import log
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Callable
- from typing import List
- from typing import Optional
- from typing import Text
here = os.path.dirname(__file__)
@@ -31,13 +24,11 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
logger = log.get_logger()
-def abs_path(path):
- # type: (Text) -> Text
+def abs_path(path: Text) -> Text:
return os.path.abspath(os.path.expanduser(path))
-def should_download(manifest_path, rebuild_time=timedelta(days=5)):
- # type: (Text, timedelta) -> bool
+def should_download(manifest_path: Text, rebuild_time: timedelta = timedelta(days=5)) -> bool:
if not os.path.exists(manifest_path):
return True
mtime = datetime.fromtimestamp(os.path.getmtime(manifest_path))
@@ -47,10 +38,9 @@ def should_download(manifest_path, rebuild_time=timedelta(days=5)):
return False
-def merge_pr_tags(repo_root, max_count=50):
- # type: (Text, int) -> List[Text]
+def merge_pr_tags(repo_root: Text, max_count: int = 50) -> List[Text]:
gitfunc = git(repo_root)
- tags = [] # type: List[Text]
+ tags: List[Text] = []
if gitfunc is None:
return tags
for line in gitfunc("log", "--format=%D", "--max-count=%s" % max_count).split("\n"):
@@ -60,8 +50,7 @@ def merge_pr_tags(repo_root, max_count=50):
return tags
-def score_name(name):
- # type: (Text) -> Optional[int]
+def score_name(name: Text) -> Optional[int]:
"""Score how much we like each filename, lower wins, None rejects"""
# Accept both ways of naming the manifest asset, even though
@@ -76,8 +65,7 @@ def score_name(name):
return None
-def github_url(tags):
- # type: (List[Text]) -> Optional[List[Text]]
+def github_url(tags: List[Text]) -> Optional[List[Text]]:
for tag in tags:
url = "https://api.github.com/repos/web-platform-tests/wpt/releases/tags/%s" % tag
try:
@@ -108,12 +96,11 @@ def github_url(tags):
def download_manifest(
- manifest_path, # type: Text
- tags_func, # type: Callable[[], List[Text]]
- url_func, # type: Callable[[List[Text]], Optional[List[Text]]]
- force=False # type: bool
-):
- # type: (...) -> bool
+ manifest_path: Text,
+ tags_func: Callable[[], List[Text]],
+ url_func: Callable[[List[Text]], Optional[List[Text]]],
+ force: bool = False
+) -> bool:
if not force and not should_download(manifest_path):
return False
@@ -178,8 +165,7 @@ def download_manifest(
return True
-def create_parser():
- # type: () -> argparse.ArgumentParser
+def create_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument(
"-p", "--path", type=abs_path, help="Path to manifest file.")
@@ -191,14 +177,12 @@ def create_parser():
return parser
-def download_from_github(path, tests_root, force=False):
- # type: (Text, Text, bool) -> bool
+def download_from_github(path: Text, tests_root: Text, force: bool = False) -> bool:
return download_manifest(path, lambda: merge_pr_tags(tests_root), github_url,
force=force)
-def run(**kwargs):
- # type: (**Any) -> int
+def run(**kwargs: Any) -> int:
if kwargs["path"] is None:
path = os.path.join(kwargs["tests_root"], "MANIFEST.json")
else:
diff --git a/tests/wpt/web-platform-tests/tools/manifest/item.py b/tests/wpt/web-platform-tests/tools/manifest/item.py
index f798ec2ae8d..500ca109a74 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/item.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/item.py
@@ -1,19 +1,18 @@
import os.path
+from abc import ABCMeta, abstractproperty
from inspect import isabstract
+from typing import (Any, Dict, Hashable, List, Optional, Sequence, Text, Tuple, Type,
+ TYPE_CHECKING, Union, cast)
from urllib.parse import urljoin, urlparse, parse_qs
-from abc import ABCMeta, abstractproperty
from .utils import to_os_path
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any, Dict, Hashable, List, Optional, Sequence, Text, Tuple, Type, Union, cast
+if TYPE_CHECKING:
from .manifest import Manifest
- Fuzzy = Dict[Optional[Tuple[str, str, str]], List[int]]
- PageRanges = Dict[str, List[int]]
-item_types = {} # type: Dict[str, Type[ManifestItem]]
+Fuzzy = Dict[Optional[Tuple[str, str, str]], List[int]]
+PageRanges = Dict[str, List[int]]
+item_types: Dict[str, Type["ManifestItem"]] = {}
class ManifestItemMeta(ABCMeta):
@@ -21,18 +20,13 @@ class ManifestItemMeta(ABCMeta):
item_types dictionary according to the value of their item_type
attribute, and otherwise behaves like an ABCMeta."""
- def __new__(cls, name, bases, attrs):
- # type: (Type[ManifestItemMeta], str, Tuple[type], Dict[str, Any]) -> ManifestItemMeta
+ def __new__(cls: Type["ManifestItemMeta"], name: str, bases: Tuple[type], attrs: Dict[str, Any]) -> "ManifestItemMeta":
inst = super().__new__(cls, name, bases, attrs)
if isabstract(inst):
return inst
assert issubclass(inst, ManifestItem)
- if MYPY:
- item_type = cast(str, inst.item_type)
- else:
- assert isinstance(inst.item_type, str)
- item_type = inst.item_type
+ item_type = cast(str, inst.item_type)
item_types[item_type] = inst
@@ -42,58 +36,48 @@ class ManifestItemMeta(ABCMeta):
class ManifestItem(metaclass=ManifestItemMeta):
__slots__ = ("_tests_root", "path")
- def __init__(self, tests_root, path):
- # type: (Text, Text) -> None
+ def __init__(self, tests_root: Text, path: Text) -> None:
self._tests_root = tests_root
self.path = path
@abstractproperty
- def id(self):
- # type: () -> Text
+ def id(self) -> Text:
"""The test's id (usually its url)"""
pass
@abstractproperty
- def item_type(self):
- # type: () -> str
+ def item_type(self) -> str:
"""The item's type"""
pass
@property
- def path_parts(self):
- # type: () -> Tuple[Text, ...]
+ def path_parts(self) -> Tuple[Text, ...]:
return tuple(self.path.split(os.path.sep))
- def key(self):
- # type: () -> Hashable
+ def key(self) -> Hashable:
"""A unique identifier for the test"""
return (self.item_type, self.id)
- def __eq__(self, other):
- # type: (Any) -> bool
+ def __eq__(self, other: Any) -> bool:
if not hasattr(other, "key"):
return False
return bool(self.key() == other.key())
- def __hash__(self):
- # type: () -> int
+ def __hash__(self) -> int:
return hash(self.key())
- def __repr__(self):
- # type: () -> str
+ def __repr__(self) -> str:
return f"<{self.__module__}.{self.__class__.__name__} id={self.id!r}, path={self.path!r}>"
- def to_json(self):
- # type: () -> Tuple[Any, ...]
+ def to_json(self) -> Tuple[Any, ...]:
return ()
@classmethod
def from_json(cls,
- manifest, # type: Manifest
- path, # type: Text
- obj # type: Any
- ):
- # type: (...) -> ManifestItem
+ manifest: "Manifest",
+ path: Text,
+ obj: Any
+ ) -> "ManifestItem":
path = to_os_path(path)
tests_root = manifest.tests_root
assert tests_root is not None
@@ -104,13 +88,12 @@ class URLManifestItem(ManifestItem):
__slots__ = ("url_base", "_url", "_extras", "_flags")
def __init__(self,
- tests_root, # type: Text
- path, # type: Text
- url_base, # type: Text
- url, # type: Optional[Text]
- **extras # type: Any
- ):
- # type: (...) -> None
+ tests_root: Text,
+ path: Text,
+ url_base: Text,
+ url: Optional[Text],
+ **extras: Any
+ ) -> None:
super().__init__(tests_root, path)
assert url_base[0] == "/"
self.url_base = url_base
@@ -122,13 +105,11 @@ class URLManifestItem(ManifestItem):
set(parse_qs(parsed_url.query).get("wpt_flags", [])))
@property
- def id(self):
- # type: () -> Text
+ def id(self) -> Text:
return self.url
@property
- def url(self):
- # type: () -> Text
+ def url(self) -> Text:
rel_url = self._url or self.path.replace(os.path.sep, "/")
# we can outperform urljoin, because we know we just have path relative URLs
if self.url_base == "/":
@@ -136,35 +117,30 @@ class URLManifestItem(ManifestItem):
return urljoin(self.url_base, rel_url)
@property
- def https(self):
- # type: () -> bool
+ def https(self) -> bool:
return "https" in self._flags or "serviceworker" in self._flags or "serviceworker-module" in self._flags
@property
- def h2(self):
- # type: () -> bool
+ def h2(self) -> bool:
return "h2" in self._flags
@property
- def subdomain(self):
- # type: () -> bool
+ def subdomain(self) -> bool:
# Note: this is currently hard-coded to check for `www`, rather than
# all possible valid subdomains. It can be extended if needed.
return "www" in self._flags
- def to_json(self):
- # type: () -> Tuple[Optional[Text], Dict[Any, Any]]
+ def to_json(self) -> Tuple[Optional[Text], Dict[Any, Any]]:
rel_url = None if self._url == self.path.replace(os.path.sep, "/") else self._url
- rv = (rel_url, {}) # type: Tuple[Optional[Text], Dict[Any, Any]]
+ rv: Tuple[Optional[Text], Dict[Any, Any]] = (rel_url, {})
return rv
@classmethod
def from_json(cls,
- manifest, # type: Manifest
- path, # type: Text
- obj # type: Tuple[Text, Dict[Any, Any]]
- ):
- # type: (...) -> URLManifestItem
+ manifest: "Manifest",
+ path: Text,
+ obj: Tuple[Text, Dict[Any, Any]]
+ ) -> "URLManifestItem":
path = to_os_path(path)
url, extras = obj
tests_root = manifest.tests_root
@@ -182,32 +158,26 @@ class TestharnessTest(URLManifestItem):
item_type = "testharness"
@property
- def timeout(self):
- # type: () -> Optional[Text]
+ def timeout(self) -> Optional[Text]:
return self._extras.get("timeout")
@property
- def pac(self):
- # type: () -> Optional[Text]
+ def pac(self) -> Optional[Text]:
return self._extras.get("pac")
@property
- def testdriver(self):
- # type: () -> Optional[Text]
+ def testdriver(self) -> Optional[Text]:
return self._extras.get("testdriver")
@property
- def jsshell(self):
- # type: () -> Optional[Text]
+ def jsshell(self) -> Optional[Text]:
return self._extras.get("jsshell")
@property
- def script_metadata(self):
- # type: () -> Optional[List[Tuple[Text, Text]]]
+ def script_metadata(self) -> Optional[List[Tuple[Text, Text]]]:
return self._extras.get("script_metadata")
- def to_json(self):
- # type: () -> Tuple[Optional[Text], Dict[Text, Any]]
+ def to_json(self) -> Tuple[Optional[Text], Dict[Text, Any]]:
rv = super().to_json()
if self.timeout is not None:
rv[-1]["timeout"] = self.timeout
@@ -228,45 +198,41 @@ class RefTest(URLManifestItem):
item_type = "reftest"
def __init__(self,
- tests_root, # type: Text
- path, # type: Text
- url_base, # type: Text
- url, # type: Optional[Text]
- references=None, # type: Optional[List[Tuple[Text, Text]]]
- **extras # type: Any
+ tests_root: Text,
+ path: Text,
+ url_base: Text,
+ url: Optional[Text],
+ references: Optional[List[Tuple[Text, Text]]] = None,
+ **extras: Any
):
super().__init__(tests_root, path, url_base, url, **extras)
if references is None:
- self.references = [] # type: List[Tuple[Text, Text]]
+ self.references: List[Tuple[Text, Text]] = []
else:
self.references = references
@property
- def timeout(self):
- # type: () -> Optional[Text]
+ def timeout(self) -> Optional[Text]:
return self._extras.get("timeout")
@property
- def viewport_size(self):
- # type: () -> Optional[Text]
+ def viewport_size(self) -> Optional[Text]:
return self._extras.get("viewport_size")
@property
- def dpi(self):
- # type: () -> Optional[Text]
+ def dpi(self) -> Optional[Text]:
return self._extras.get("dpi")
@property
- def fuzzy(self):
- # type: () -> Fuzzy
- fuzzy = self._extras.get("fuzzy", {}) # type: Union[Fuzzy, List[Tuple[Optional[Sequence[Text]], List[int]]]]
+ def fuzzy(self) -> Fuzzy:
+ fuzzy: Union[Fuzzy, List[Tuple[Optional[Sequence[Text]], List[int]]]] = self._extras.get("fuzzy", {})
if not isinstance(fuzzy, list):
return fuzzy
- rv = {} # type: Fuzzy
+ rv: Fuzzy = {}
for k, v in fuzzy: # type: Tuple[Optional[Sequence[Text]], List[int]]
if k is None:
- key = None # type: Optional[Tuple[Text, Text, Text]]
+ key: Optional[Tuple[Text, Text, Text]] = None
else:
# mypy types this as Tuple[Text, ...]
assert len(k) == 3
@@ -274,10 +240,9 @@ class RefTest(URLManifestItem):
rv[key] = v
return rv
- def to_json(self): # type: ignore
- # type: () -> Tuple[Optional[Text], List[Tuple[Text, Text]], Dict[Text, Any]]
+ def to_json(self) -> Tuple[Optional[Text], List[Tuple[Text, Text]], Dict[Text, Any]]: # type: ignore
rel_url = None if self._url == self.path else self._url
- rv = (rel_url, self.references, {}) # type: Tuple[Optional[Text], List[Tuple[Text, Text]], Dict[Text, Any]]
+ rv: Tuple[Optional[Text], List[Tuple[Text, Text]], Dict[Text, Any]] = (rel_url, self.references, {})
extras = rv[-1]
if self.timeout is not None:
extras["timeout"] = self.timeout
@@ -291,11 +256,10 @@ class RefTest(URLManifestItem):
@classmethod
def from_json(cls, # type: ignore
- manifest, # type: Manifest
- path, # type: Text
- obj # type: Tuple[Text, List[Tuple[Text, Text]], Dict[Any, Any]]
- ):
- # type: (...) -> RefTest
+ manifest: "Manifest",
+ path: Text,
+ obj: Tuple[Text, List[Tuple[Text, Text]], Dict[Any, Any]]
+ ) -> "RefTest":
tests_root = manifest.tests_root
assert tests_root is not None
path = to_os_path(path)
@@ -314,8 +278,7 @@ class PrintRefTest(RefTest):
item_type = "print-reftest"
@property
- def page_ranges(self):
- # type: () -> PageRanges
+ def page_ranges(self) -> PageRanges:
return self._extras.get("page_ranges", {})
def to_json(self): # type: ignore
@@ -349,8 +312,7 @@ class CrashTest(URLManifestItem):
item_type = "crashtest"
@property
- def timeout(self):
- # type: () -> Optional[Text]
+ def timeout(self) -> Optional[Text]:
return None
@@ -360,12 +322,10 @@ class WebDriverSpecTest(URLManifestItem):
item_type = "wdspec"
@property
- def timeout(self):
- # type: () -> Optional[Text]
+ def timeout(self) -> Optional[Text]:
return self._extras.get("timeout")
- def to_json(self):
- # type: () -> Tuple[Optional[Text], Dict[Text, Any]]
+ def to_json(self) -> Tuple[Optional[Text], Dict[Text, Any]]:
rv = super().to_json()
if self.timeout is not None:
rv[-1]["timeout"] = self.timeout
@@ -378,6 +338,5 @@ class SupportFile(ManifestItem):
item_type = "support"
@property
- def id(self):
- # type: () -> Text
+ def id(self) -> Text:
return self.path
diff --git a/tests/wpt/web-platform-tests/tools/manifest/jsonlib.py b/tests/wpt/web-platform-tests/tools/manifest/jsonlib.py
index 49eaf02e800..9c39d5b32ee 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/jsonlib.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/jsonlib.py
@@ -1,11 +1,6 @@
import re
import json
-
-
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any, AnyStr, Callable, Dict, IO, Text
+from typing import Any, AnyStr, Callable, Dict, IO, Text
__all__ = ["load", "dump_local", "dump_local", "dump_dist", "dumps_dist"]
@@ -23,7 +18,7 @@ else:
#
if has_ujson:
- load = ujson.load # type: Callable[[IO[AnyStr]], Any]
+ load: Callable[[IO[AnyStr]], Any] = ujson.load
else:
load = json.load
@@ -34,7 +29,7 @@ else:
#
if has_ujson:
- loads = ujson.loads # type: Callable[[AnyStr], Any]
+ loads: Callable[[AnyStr], Any] = ujson.loads
else:
loads = json.loads
@@ -43,19 +38,19 @@ else:
#
# dump/dumps_local options for some libraries
#
-_ujson_dump_local_kwargs = {
+_ujson_dump_local_kwargs: Dict[str, Any] = {
'ensure_ascii': False,
'escape_forward_slashes': False,
'indent': 1,
'reject_bytes': True,
-} # type: Dict[str, Any]
+}
-_json_dump_local_kwargs = {
+_json_dump_local_kwargs: Dict[str, Any] = {
'ensure_ascii': False,
'indent': 1,
'separators': (',', ': '),
-} # type: Dict[str, Any]
+}
#
@@ -63,13 +58,11 @@ _json_dump_local_kwargs = {
#
if has_ujson:
- def dump_local(obj, fp):
- # type: (Any, IO[str]) -> None
+ def dump_local(obj: Any, fp: IO[str]) -> None:
return ujson.dump(obj, fp, **_ujson_dump_local_kwargs)
else:
- def dump_local(obj, fp):
- # type: (Any, IO[str]) -> None
+ def dump_local(obj: Any, fp: IO[str]) -> None:
return json.dump(obj, fp, **_json_dump_local_kwargs)
@@ -78,13 +71,11 @@ else:
#
if has_ujson:
- def dumps_local(obj):
- # type: (Any) -> Text
+ def dumps_local(obj: Any) -> Text:
return ujson.dumps(obj, **_ujson_dump_local_kwargs)
else:
- def dumps_local(obj):
- # type: (Any) -> Text
+ def dumps_local(obj: Any) -> Text:
return json.dumps(obj, **_json_dump_local_kwargs)
@@ -92,48 +83,42 @@ else:
# dump/dumps_dist (for distributed usage of JSON where files should safely roundtrip)
#
-_ujson_dump_dist_kwargs = {
+_ujson_dump_dist_kwargs: Dict[str, Any] = {
'sort_keys': True,
'indent': 1,
'reject_bytes': True,
-} # type: Dict[str, Any]
+}
-_json_dump_dist_kwargs = {
+_json_dump_dist_kwargs: Dict[str, Any] = {
'sort_keys': True,
'indent': 1,
'separators': (',', ': '),
-} # type: Dict[str, Any]
+}
if has_ujson:
if ujson.dumps([], indent=1) == "[]":
# optimistically see if https://github.com/ultrajson/ultrajson/issues/429 is fixed
- def _ujson_fixup(s):
- # type: (str) -> str
+ def _ujson_fixup(s: str) -> str:
return s
else:
_ujson_fixup_re = re.compile(r"([\[{])[\n\x20]+([}\]])")
- def _ujson_fixup(s):
- # type: (str) -> str
+ def _ujson_fixup(s: str) -> str:
return _ujson_fixup_re.sub(
lambda m: m.group(1) + m.group(2),
s
)
- def dump_dist(obj, fp):
- # type: (Any, IO[str]) -> None
+ def dump_dist(obj: Any, fp: IO[str]) -> None:
fp.write(_ujson_fixup(ujson.dumps(obj, **_ujson_dump_dist_kwargs)))
- def dumps_dist(obj):
- # type: (Any) -> Text
+ def dumps_dist(obj: Any) -> Text:
return _ujson_fixup(ujson.dumps(obj, **_ujson_dump_dist_kwargs))
else:
- def dump_dist(obj, fp):
- # type: (Any, IO[str]) -> None
+ def dump_dist(obj: Any, fp: IO[str]) -> None:
json.dump(obj, fp, **_json_dump_dist_kwargs)
- def dumps_dist(obj):
- # type: (Any) -> Text
+ def dumps_dist(obj: Any) -> Text:
return json.dumps(obj, **_json_dump_dist_kwargs)
diff --git a/tests/wpt/web-platform-tests/tools/manifest/log.py b/tests/wpt/web-platform-tests/tools/manifest/log.py
index 6551c2b5f7c..7881381733b 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/log.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/log.py
@@ -2,10 +2,8 @@ import logging
logger = logging.getLogger("manifest")
-def enable_debug_logging():
- # type: () -> None
+def enable_debug_logging() -> None:
logger.setLevel(logging.DEBUG)
-def get_logger():
- # type: () -> logging.Logger
+def get_logger() -> logging.Logger:
return logger
diff --git a/tests/wpt/web-platform-tests/tools/manifest/manifest.py b/tests/wpt/web-platform-tests/tools/manifest/manifest.py
index 4b7792ec00a..f602727cb09 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/manifest.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/manifest.py
@@ -2,7 +2,10 @@ import os
import sys
from atomicwrites import atomic_write
from copy import deepcopy
+from logging import Logger
from multiprocessing import Pool, cpu_count
+from typing import (Any, Container, Dict, IO, Iterator, Iterable, Optional, Set, Text, Tuple, Type,
+ Union)
from . import jsonlib
from . import vcs
@@ -20,25 +23,9 @@ from .log import get_logger
from .sourcefile import SourceFile
from .typedata import TypeData
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from logging import Logger
- from typing import Any
- from typing import Container
- from typing import Dict
- from typing import IO
- from typing import Iterator
- from typing import Iterable
- from typing import Optional
- from typing import Set
- from typing import Text
- from typing import Tuple
- from typing import Type
- from typing import Union
-CURRENT_VERSION = 8 # type: int
+CURRENT_VERSION: int = 8
class ManifestError(Exception):
@@ -53,60 +40,52 @@ class InvalidCacheError(Exception):
pass
-item_classes = {"testharness": TestharnessTest,
- "reftest": RefTest,
- "print-reftest": PrintRefTest,
- "crashtest": CrashTest,
- "manual": ManualTest,
- "wdspec": WebDriverSpecTest,
- "conformancechecker": ConformanceCheckerTest,
- "visual": VisualTest,
- "support": SupportFile} # type: Dict[Text, Type[ManifestItem]]
+item_classes: Dict[Text, Type[ManifestItem]] = {"testharness": TestharnessTest,
+ "reftest": RefTest,
+ "print-reftest": PrintRefTest,
+ "crashtest": CrashTest,
+ "manual": ManualTest,
+ "wdspec": WebDriverSpecTest,
+ "conformancechecker": ConformanceCheckerTest,
+ "visual": VisualTest,
+ "support": SupportFile}
-def compute_manifest_items(source_file):
- # type: (SourceFile) -> Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]
+def compute_manifest_items(source_file: SourceFile) -> Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]:
rel_path_parts = source_file.rel_path_parts
new_type, manifest_items = source_file.manifest_items()
file_hash = source_file.hash
return rel_path_parts, new_type, set(manifest_items), file_hash
-if MYPY:
- ManifestDataType = Dict[Any, TypeData]
-else:
- ManifestDataType = dict
+ManifestDataType = Dict[Any, TypeData]
class ManifestData(ManifestDataType):
- def __init__(self, manifest):
- # type: (Manifest) -> None
+ def __init__(self, manifest: "Manifest") -> None:
"""Dictionary subclass containing a TypeData instance for each test type,
keyed by type name"""
- self.initialized = False # type: bool
+ self.initialized: bool = False
for key, value in item_classes.items():
self[key] = TypeData(manifest, value)
self.initialized = True
- self.json_obj = None # type: None
+ self.json_obj: None = None
- def __setitem__(self, key, value):
- # type: (Text, TypeData) -> None
+ def __setitem__(self, key: Text, value: TypeData) -> None:
if self.initialized:
raise AttributeError
dict.__setitem__(self, key, value)
- def paths(self):
- # type: () -> Set[Text]
+ def paths(self) -> Set[Text]:
"""Get a list of all paths containing test items
without actually constructing all the items"""
- rv = set() # type: Set[Text]
+ rv: Set[Text] = set()
for item_data in self.values():
for item in item_data:
rv.add(os.path.sep.join(item))
return rv
- def type_by_path(self):
- # type: () -> Dict[Tuple[Text, ...], Text]
+ def type_by_path(self) -> Dict[Tuple[Text, ...], Text]:
rv = {}
for item_type, item_data in self.items():
for item in item_data:
@@ -115,27 +94,23 @@ class ManifestData(ManifestDataType):
class Manifest:
- def __init__(self, tests_root, url_base="/"):
- # type: (Text, Text) -> None
+ def __init__(self, tests_root: Text, url_base: Text = "/") -> None:
assert url_base is not None
- self._data = ManifestData(self) # type: ManifestData
- self.tests_root = tests_root # type: Text
- self.url_base = url_base # type: Text
+ self._data: ManifestData = ManifestData(self)
+ self.tests_root: Text = tests_root
+ self.url_base: Text = url_base
- def __iter__(self):
- # type: () -> Iterator[Tuple[Text, Text, Set[ManifestItem]]]
+ def __iter__(self) -> Iterator[Tuple[Text, Text, Set[ManifestItem]]]:
return self.itertypes()
- def itertypes(self, *types):
- # type: (*Text) -> Iterator[Tuple[Text, Text, Set[ManifestItem]]]
+ def itertypes(self, *types: Text) -> Iterator[Tuple[Text, Text, Set[ManifestItem]]]:
for item_type in (types or sorted(self._data.keys())):
for path in self._data[item_type]:
rel_path = os.sep.join(path)
tests = self._data[item_type][path]
yield item_type, rel_path, tests
- def iterpath(self, path):
- # type: (Text) -> Iterable[ManifestItem]
+ def iterpath(self, path: Text) -> Iterable[ManifestItem]:
tpath = tuple(path.split(os.path.sep))
for type_tests in self._data.values():
@@ -143,8 +118,7 @@ class Manifest:
assert i is not None
yield from i
- def iterdir(self, dir_name):
- # type: (Text) -> Iterable[ManifestItem]
+ def iterdir(self, dir_name: Text) -> Iterable[ManifestItem]:
tpath = tuple(dir_name.split(os.path.sep))
tpath_len = len(tpath)
@@ -153,8 +127,7 @@ class Manifest:
if path[:tpath_len] == tpath:
yield from tests
- def update(self, tree, parallel=True):
- # type: (Iterable[Tuple[Text, Optional[Text], bool]], bool) -> bool
+ def update(self, tree: Iterable[Tuple[Text, Optional[Text], bool]], parallel: bool = True) -> bool:
"""Update the manifest given an iterable of items that make up the updated manifest.
The iterable must either generate tuples of the form (SourceFile, True) for paths
@@ -197,7 +170,7 @@ class Manifest:
self.url_base,
file_hash)
- hash_changed = False # type: bool
+ hash_changed: bool = False
if not is_new:
if file_hash is None:
@@ -238,10 +211,12 @@ class Manifest:
chunksize = max(1, len(to_update) // 10000)
logger.debug("Doing a multiprocessed update. CPU count: %s, "
"processes: %s, chunksize: %s" % (cpu_count(), processes, chunksize))
- results = pool.imap_unordered(compute_manifest_items,
- to_update,
- chunksize=chunksize
- ) # type: Iterator[Tuple[Tuple[Text, ...], Text, Set[ManifestItem], Text]]
+ results: Iterator[Tuple[Tuple[Text, ...],
+ Text,
+ Set[ManifestItem], Text]] = pool.imap_unordered(
+ compute_manifest_items,
+ to_update,
+ chunksize=chunksize)
else:
results = map(compute_manifest_items, to_update)
@@ -264,8 +239,7 @@ class Manifest:
return changed
- def to_json(self, caller_owns_obj=True):
- # type: (bool) -> Dict[Text, Any]
+ def to_json(self, caller_owns_obj: bool = True) -> Dict[Text, Any]:
"""Dump a manifest into a object which can be serialized as JSON
If caller_owns_obj is False, then the return value remains
@@ -284,14 +258,17 @@ class Manifest:
if caller_owns_obj:
out_items = deepcopy(out_items)
- rv = {"url_base": self.url_base,
+ rv: Dict[Text, Any] = {"url_base": self.url_base,
"items": out_items,
- "version": CURRENT_VERSION} # type: Dict[Text, Any]
+ "version": CURRENT_VERSION}
return rv
@classmethod
- def from_json(cls, tests_root, obj, types=None, callee_owns_obj=False):
- # type: (Text, Dict[Text, Any], Optional[Container[Text]], bool) -> Manifest
+ def from_json(cls,
+ tests_root: Text,
+ obj: Dict[Text, Any],
+ types: Optional[Container[Text]] = None,
+ callee_owns_obj: bool = False) -> "Manifest":
"""Load a manifest from a JSON object
This loads a manifest for a given local test_root path from an
@@ -327,24 +304,22 @@ class Manifest:
return self
-def load(tests_root, manifest, types=None):
- # type: (Text, Union[IO[bytes], Text], Optional[Container[Text]]) -> Optional[Manifest]
+def load(tests_root: Text, manifest: Union[IO[bytes], Text], types: Optional[Container[Text]] = None) -> Optional[Manifest]:
logger = get_logger()
logger.warning("Prefer load_and_update instead")
return _load(logger, tests_root, manifest, types)
-__load_cache = {} # type: Dict[Text, Manifest]
+__load_cache: Dict[Text, Manifest] = {}
-def _load(logger, # type: Logger
- tests_root, # type: Text
- manifest, # type: Union[IO[bytes], Text]
- types=None, # type: Optional[Container[Text]]
- allow_cached=True # type: bool
- ):
- # type: (...) -> Optional[Manifest]
+def _load(logger: Logger,
+ tests_root: Text,
+ manifest: Union[IO[bytes], Text],
+ types: Optional[Container[Text]] = None,
+ allow_cached: bool = True
+ ) -> Optional[Manifest]:
manifest_path = (manifest if isinstance(manifest, str)
else manifest.name)
if allow_cached and manifest_path in __load_cache:
@@ -377,20 +352,19 @@ def _load(logger, # type: Logger
return rv
-def load_and_update(tests_root, # type: Text
- manifest_path, # type: Text
- url_base, # type: Text
- update=True, # type: bool
- rebuild=False, # type: bool
- metadata_path=None, # type: Optional[Text]
- cache_root=None, # type: Optional[Text]
- working_copy=True, # type: bool
- types=None, # type: Optional[Container[Text]]
- write_manifest=True, # type: bool
- allow_cached=True, # type: bool
- parallel=True # type: bool
- ):
- # type: (...) -> Manifest
+def load_and_update(tests_root: Text,
+ manifest_path: Text,
+ url_base: Text,
+ update: bool = True,
+ rebuild: bool = False,
+ metadata_path: Optional[Text] = None,
+ cache_root: Optional[Text] = None,
+ working_copy: bool = True,
+ types: Optional[Container[Text]] = None,
+ write_manifest: bool = True,
+ allow_cached: bool = True,
+ parallel: bool = True
+ ) -> Manifest:
logger = get_logger()
@@ -437,8 +411,7 @@ def load_and_update(tests_root, # type: Text
return manifest
-def write(manifest, manifest_path):
- # type: (Manifest, Text) -> None
+def write(manifest: Manifest, manifest_path: Text) -> None:
dir_name = os.path.dirname(manifest_path)
if not os.path.exists(dir_name):
os.makedirs(dir_name)
diff --git a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
index 3919b5ac102..386833722e7 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/sourcefile.py
@@ -2,27 +2,11 @@ import hashlib
import re
import os
from collections import deque
+from fnmatch import fnmatch
from io import BytesIO
+from typing import (Any, BinaryIO, Callable, Deque, Dict, Iterable, List, Optional, Pattern,
+ Set, Text, Tuple, Union, cast)
from urllib.parse import urljoin
-from fnmatch import fnmatch
-
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import BinaryIO
- from typing import Callable
- from typing import Deque
- from typing import Dict
- from typing import Iterable
- from typing import List
- from typing import Optional
- from typing import Pattern
- from typing import Set
- from typing import Text
- from typing import Tuple
- from typing import Union
- from typing import cast
try:
from xml.etree import cElementTree as ElementTree
@@ -50,11 +34,10 @@ python_meta_re = re.compile(br"#\s*META:\s*(\w*)=(.*)$")
reference_file_re = re.compile(r'(^|[\-_])(not)?ref[0-9]*([\-_]|$)')
-space_chars = "".join(html5lib.constants.spaceCharacters) # type: Text
+space_chars: Text = "".join(html5lib.constants.spaceCharacters)
-def replace_end(s, old, new):
- # type: (Text, Text, Text) -> Text
+def replace_end(s: Text, old: Text, new: Text) -> Text:
"""
Given a string `s` that ends with `old`, replace that occurrence of `old`
with `new`.
@@ -63,8 +46,7 @@ def replace_end(s, old, new):
return s[:-len(old)] + new
-def read_script_metadata(f, regexp):
- # type: (BinaryIO, Pattern[bytes]) -> Iterable[Tuple[Text, Text]]
+def read_script_metadata(f: BinaryIO, regexp: Pattern[bytes]) -> Iterable[Tuple[Text, Text]]:
"""
Yields any metadata (pairs of strings) from the file-like object `f`,
as specified according to a supplied regexp.
@@ -81,7 +63,7 @@ def read_script_metadata(f, regexp):
yield (m.groups()[0].decode("utf8"), m.groups()[1].decode("utf8"))
-_any_variants = {
+_any_variants: Dict[Text, Dict[Text, Any]] = {
"window": {"suffix": ".any.html"},
"serviceworker": {"force_https": True},
"serviceworker-module": {"force_https": True},
@@ -93,11 +75,10 @@ _any_variants = {
"worker-module": {},
"shadowrealm": {},
"jsshell": {"suffix": ".any.js"},
-} # type: Dict[Text, Dict[Text, Any]]
+}
-def get_any_variants(item):
- # type: (Text) -> Set[Text]
+def get_any_variants(item: Text) -> Set[Text]:
"""
Returns a set of variants (strings) defined by the given keyword.
"""
@@ -110,16 +91,14 @@ def get_any_variants(item):
return variant.get("longhand", {item})
-def get_default_any_variants():
- # type: () -> Set[Text]
+def get_default_any_variants() -> Set[Text]:
"""
Returns a set of variants (strings) that will be used by default.
"""
return set({"window", "dedicatedworker"})
-def parse_variants(value):
- # type: (Text) -> Set[Text]
+def parse_variants(value: Text) -> Set[Text]:
"""
Returns a set of variants (strings) defined by a comma-separated value.
"""
@@ -135,8 +114,7 @@ def parse_variants(value):
return globals
-def global_suffixes(value):
- # type: (Text) -> Set[Tuple[Text, bool]]
+def global_suffixes(value: Text) -> Set[Tuple[Text, bool]]:
"""
Yields tuples of the relevant filename suffix (a string) and whether the
variant is intended to run in a JS shell, for the variants defined by the
@@ -155,8 +133,7 @@ def global_suffixes(value):
return rv
-def global_variant_url(url, suffix):
- # type: (Text, Text) -> Text
+def global_variant_url(url: Text, suffix: Text) -> Text:
"""
Returns a url created from the given url and suffix (all strings).
"""
@@ -170,17 +147,11 @@ def global_variant_url(url, suffix):
return replace_end(url, ".js", suffix)
-def _parse_html(f):
- # type: (BinaryIO) -> ElementTree.Element
+def _parse_html(f: BinaryIO) -> ElementTree.Element:
doc = html5lib.parse(f, treebuilder="etree", useChardet=False)
- if MYPY:
- return cast(ElementTree.Element, doc)
- else:
- # (needs to be in else for mypy to believe this is reachable)
- return doc
-
-def _parse_xml(f):
- # type: (BinaryIO) -> ElementTree.Element
+ return cast(ElementTree.Element, doc)
+
+def _parse_xml(f: BinaryIO) -> ElementTree.Element:
try:
# raises ValueError with an unsupported encoding,
# ParseError when there's an undefined entity
@@ -191,9 +162,9 @@ def _parse_xml(f):
class SourceFile:
- parsers = {"html":_parse_html,
+ parsers: Dict[Text, Callable[[BinaryIO], ElementTree.Element]] = {"html":_parse_html,
"xhtml":_parse_xml,
- "svg":_parse_xml} # type: Dict[Text, Callable[[BinaryIO], ElementTree.Element]]
+ "svg":_parse_xml}
root_dir_non_test = {"common"}
@@ -201,12 +172,15 @@ class SourceFile:
"support",
"tools"}
- dir_path_non_test = {("css21", "archive"),
- ("css", "CSS2", "archive"),
- ("css", "common")} # type: Set[Tuple[Text, ...]]
+ dir_path_non_test: Set[Tuple[Text, ...]] = {("css21", "archive"),
+ ("css", "CSS2", "archive"),
+ ("css", "common")}
- def __init__(self, tests_root, rel_path, url_base, hash=None, contents=None):
- # type: (Text, Text, Text, Optional[Text], Optional[bytes]) -> None
+ def __init__(self, tests_root: Text,
+ rel_path: Text,
+ url_base: Text,
+ hash: Optional[Text] = None,
+ contents: Optional[bytes] = None) -> None:
"""Object representing a file in a source tree.
:param tests_root: Path to the root of the source tree
@@ -229,21 +203,20 @@ class SourceFile:
meta_flags = name.split(".")[1:]
- self.tests_root = tests_root # type: Text
- self.rel_path = rel_path # type: Text
- self.dir_path = dir_path # type: Text
- self.filename = filename # type: Text
- self.name = name # type: Text
- self.ext = ext # type: Text
- self.type_flag = type_flag # type: Optional[Text]
- self.meta_flags = meta_flags # type: Union[List[bytes], List[Text]]
+ self.tests_root: Text = tests_root
+ self.rel_path: Text = rel_path
+ self.dir_path: Text = dir_path
+ self.filename: Text = filename
+ self.name: Text = name
+ self.ext: Text = ext
+ self.type_flag: Optional[Text] = type_flag
+ self.meta_flags: Union[List[bytes], List[Text]] = meta_flags
self.url_base = url_base
self.contents = contents
- self.items_cache = None # type: Optional[Tuple[Text, List[ManifestItem]]]
+ self.items_cache: Optional[Tuple[Text, List[ManifestItem]]] = None
self._hash = hash
- def __getstate__(self):
- # type: () -> Dict[str, Any]
+ def __getstate__(self) -> Dict[str, Any]:
# Remove computed properties if we pickle this class
rv = self.__dict__.copy()
@@ -253,58 +226,50 @@ class SourceFile:
del rv["__cached_properties__"]
return rv
- def name_prefix(self, prefix):
- # type: (Text) -> bool
+ def name_prefix(self, prefix: Text) -> bool:
"""Check if the filename starts with a given prefix
:param prefix: The prefix to check"""
return self.name.startswith(prefix)
- def is_dir(self):
- # type: () -> bool
+ def is_dir(self) -> bool:
"""Return whether this file represents a directory."""
if self.contents is not None:
return False
return os.path.isdir(self.rel_path)
- def open(self):
- # type: () -> BinaryIO
+ def open(self) -> BinaryIO:
"""
Return either
* the contents specified in the constructor, if any;
* a File object opened for reading the file contents.
"""
if self.contents is not None:
- file_obj = BytesIO(self.contents) # type: BinaryIO
+ file_obj: BinaryIO = BytesIO(self.contents)
else:
file_obj = open(self.path, 'rb')
return file_obj
@cached_property
- def rel_path_parts(self):
- # type: () -> Tuple[Text, ...]
+ def rel_path_parts(self) -> Tuple[Text, ...]:
return tuple(self.rel_path.split(os.path.sep))
@cached_property
- def path(self):
- # type: () -> Text
+ def path(self) -> Text:
return os.path.join(self.tests_root, self.rel_path)
@cached_property
- def rel_url(self):
- # type: () -> Text
+ def rel_url(self) -> Text:
assert not os.path.isabs(self.rel_path), self.rel_path
return self.rel_path.replace(os.sep, "/")
@cached_property
- def url(self):
- # type: () -> Text
+ def url(self) -> Text:
return urljoin(self.url_base, self.rel_url)
@cached_property
- def hash(self):
- # type: () -> Text
+ def hash(self) -> Text:
if not self._hash:
with self.open() as f:
content = f.read()
@@ -314,8 +279,7 @@ class SourceFile:
return self._hash
- def in_non_test_dir(self):
- # type: () -> bool
+ def in_non_test_dir(self) -> bool:
if self.dir_path == "":
return True
@@ -327,13 +291,11 @@ class SourceFile:
return True
return False
- def in_conformance_checker_dir(self):
- # type: () -> bool
+ def in_conformance_checker_dir(self) -> bool:
return self.rel_path_parts[0] == "conformance-checkers"
@property
- def name_is_non_test(self):
- # type: () -> bool
+ def name_is_non_test(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a non-test file"""
return (self.is_dir() or
@@ -345,54 +307,46 @@ class SourceFile:
self.in_non_test_dir())
@property
- def name_is_conformance(self):
- # type: () -> bool
+ def name_is_conformance(self) -> bool:
return (self.in_conformance_checker_dir() and
self.type_flag in ("is-valid", "no-valid"))
@property
- def name_is_conformance_support(self):
- # type: () -> bool
+ def name_is_conformance_support(self) -> bool:
return self.in_conformance_checker_dir()
@property
- def name_is_manual(self):
- # type: () -> bool
+ def name_is_manual(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a manual test file"""
return self.type_flag == "manual"
@property
- def name_is_visual(self):
- # type: () -> bool
+ def name_is_visual(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a visual test file"""
return self.type_flag == "visual"
@property
- def name_is_multi_global(self):
- # type: () -> bool
+ def name_is_multi_global(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a multi-global js test file"""
return "any" in self.meta_flags and self.ext == ".js"
@property
- def name_is_worker(self):
- # type: () -> bool
+ def name_is_worker(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a worker js test file"""
return "worker" in self.meta_flags and self.ext == ".js"
@property
- def name_is_window(self):
- # type: () -> bool
+ def name_is_window(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a window js test file"""
return "window" in self.meta_flags and self.ext == ".js"
@property
- def name_is_webdriver(self):
- # type: () -> bool
+ def name_is_webdriver(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a webdriver spec test file"""
# wdspec tests are in subdirectories of /webdriver excluding __init__.py
@@ -405,21 +359,18 @@ class SourceFile:
fnmatch(self.filename, wd_pattern))
@property
- def name_is_reference(self):
- # type: () -> bool
+ def name_is_reference(self) -> bool:
"""Check if the file name matches the conditions for the file to
be a reference file (not a reftest)"""
return "/reference/" in self.url or bool(reference_file_re.search(self.name))
@property
- def name_is_crashtest(self):
- # type: () -> bool
+ def name_is_crashtest(self) -> bool:
return (self.markup_type is not None and
(self.type_flag == "crash" or "crashtests" in self.dir_path.split(os.path.sep)))
@property
- def name_is_tentative(self):
- # type: () -> bool
+ def name_is_tentative(self) -> bool:
"""Check if the file name matches the conditions for the file to be a
tentative file.
@@ -427,14 +378,12 @@ class SourceFile:
return "tentative" in self.meta_flags or "tentative" in self.dir_path.split(os.path.sep)
@property
- def name_is_print_reftest(self):
- # type: () -> bool
+ def name_is_print_reftest(self) -> bool:
return (self.markup_type is not None and
(self.type_flag == "print" or "print" in self.dir_path.split(os.path.sep)))
@property
- def markup_type(self):
- # type: () -> Optional[Text]
+ def markup_type(self) -> Optional[Text]:
"""Return the type of markup contained in a file, based on its extension,
or None if it doesn't contain markup"""
ext = self.ext
@@ -452,8 +401,7 @@ class SourceFile:
return None
@cached_property
- def root(self):
- # type: () -> Optional[ElementTree.Element]
+ def root(self) -> Optional[ElementTree.Element]:
"""Return an ElementTree Element for the root node of the file if it contains
markup, or None if it does not"""
if not self.markup_type:
@@ -470,24 +418,21 @@ class SourceFile:
return tree
@cached_property
- def timeout_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def timeout_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify timeouts"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='timeout']")
@cached_property
- def pac_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def pac_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify PAC (proxy auto-config)"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='pac']")
@cached_property
- def script_metadata(self):
- # type: () -> Optional[List[Tuple[Text, Text]]]
+ def script_metadata(self) -> Optional[List[Tuple[Text, Text]]]:
if self.name_is_worker or self.name_is_multi_global or self.name_is_window:
regexp = js_meta_re
elif self.name_is_webdriver:
@@ -499,8 +444,7 @@ class SourceFile:
return list(read_script_metadata(f, regexp))
@cached_property
- def timeout(self):
- # type: () -> Optional[Text]
+ def timeout(self) -> Optional[Text]:
"""The timeout of a test or reference file. "long" if the file has an extended timeout
or None otherwise"""
if self.script_metadata:
@@ -511,15 +455,14 @@ class SourceFile:
return None
if self.timeout_nodes:
- timeout_str = self.timeout_nodes[0].attrib.get("content", None) # type: Optional[Text]
+ timeout_str: Optional[Text] = self.timeout_nodes[0].attrib.get("content", None)
if timeout_str and timeout_str.lower() == "long":
return "long"
return None
@cached_property
- def pac(self):
- # type: () -> Optional[Text]
+ def pac(self) -> Optional[Text]:
"""The PAC (proxy config) of a test or reference file. A URL or null"""
if self.script_metadata:
for (meta, content) in self.script_metadata:
@@ -535,16 +478,14 @@ class SourceFile:
return None
@cached_property
- def viewport_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def viewport_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify viewport sizes"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='viewport-size']")
@cached_property
- def viewport_size(self):
- # type: () -> Optional[Text]
+ def viewport_size(self) -> Optional[Text]:
"""The viewport size of a test or reference file"""
if self.root is None:
return None
@@ -555,16 +496,14 @@ class SourceFile:
return self.viewport_nodes[0].attrib.get("content", None)
@cached_property
- def dpi_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def dpi_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify device pixel ratios"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='device-pixel-ratio']")
@cached_property
- def dpi(self):
- # type: () -> Optional[Text]
+ def dpi(self) -> Optional[Text]:
"""The device pixel ratio of a test or reference file"""
if self.root is None:
return None
@@ -574,13 +513,12 @@ class SourceFile:
return self.dpi_nodes[0].attrib.get("content", None)
- def parse_ref_keyed_meta(self, node):
- # type: (ElementTree.Element) -> Tuple[Optional[Tuple[Text, Text, Text]], Text]
- item = node.attrib.get("content", "") # type: Text
+ def parse_ref_keyed_meta(self, node: ElementTree.Element) -> Tuple[Optional[Tuple[Text, Text, Text]], Text]:
+ item: Text = node.attrib.get("content", "")
parts = item.rsplit(":", 1)
if len(parts) == 1:
- key = None # type: Optional[Tuple[Text, Text, Text]]
+ key: Optional[Tuple[Text, Text, Text]] = None
value = parts[0]
else:
key_part = urljoin(self.url, parts[0])
@@ -598,8 +536,7 @@ class SourceFile:
@cached_property
- def fuzzy_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def fuzzy_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify reftest fuzziness"""
assert self.root is not None
@@ -607,9 +544,8 @@ class SourceFile:
@cached_property
- def fuzzy(self):
- # type: () -> Dict[Optional[Tuple[Text, Text, Text]], List[List[int]]]
- rv = {} # type: Dict[Optional[Tuple[Text, Text, Text]], List[List[int]]]
+ def fuzzy(self) -> Dict[Optional[Tuple[Text, Text, Text]], List[List[int]]]:
+ rv: Dict[Optional[Tuple[Text, Text, Text]], List[List[int]]] = {}
if self.root is None:
return rv
@@ -623,10 +559,10 @@ class SourceFile:
ranges = value.split(";")
if len(ranges) != 2:
raise ValueError("Malformed fuzzy value %s" % value)
- arg_values = {} # type: Dict[Text, List[int]]
- positional_args = deque() # type: Deque[List[int]]
+ arg_values: Dict[Text, List[int]] = {}
+ positional_args: Deque[List[int]] = deque()
for range_str_value in ranges: # type: Text
- name = None # type: Optional[Text]
+ name: Optional[Text] = None
if "=" in range_str_value:
name, range_str_value = (part.strip()
for part in range_str_value.split("=", 1))
@@ -659,19 +595,17 @@ class SourceFile:
return rv
@cached_property
- def page_ranges_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def page_ranges_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify print-reftest """
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='reftest-pages']")
@cached_property
- def page_ranges(self):
- # type: () -> Dict[Text, List[List[Optional[int]]]]
+ def page_ranges(self) -> Dict[Text, List[List[Optional[int]]]]:
"""List of ElementTree Elements corresponding to nodes in a test that
specify print-reftest page ranges"""
- rv = {} # type: Dict[Text, List[List[Optional[int]]]]
+ rv: Dict[Text, List[List[Optional[int]]]] = {}
for node in self.page_ranges_nodes:
key_data, value = self.parse_ref_keyed_meta(node)
# Just key by url
@@ -701,16 +635,14 @@ class SourceFile:
return rv
@cached_property
- def testharness_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def testharness_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
testharness.js script"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src='/resources/testharness.js']")
@cached_property
- def content_is_testharness(self):
- # type: () -> Optional[bool]
+ def content_is_testharness(self) -> Optional[bool]:
"""Boolean indicating whether the file content represents a
testharness.js test"""
if self.root is None:
@@ -718,17 +650,15 @@ class SourceFile:
return bool(self.testharness_nodes)
@cached_property
- def variant_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def variant_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
test variant"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='variant']")
@cached_property
- def test_variants(self):
- # type: () -> List[Text]
- rv = [] # type: List[Text]
+ def test_variants(self) -> List[Text]:
+ rv: List[Text] = []
if self.ext == ".js":
script_metadata = self.script_metadata
assert script_metadata is not None
@@ -738,7 +668,7 @@ class SourceFile:
else:
for element in self.variant_nodes:
if "content" in element.attrib:
- variant = element.attrib["content"] # type: Text
+ variant: Text = element.attrib["content"]
rv.append(variant)
for variant in rv:
@@ -755,16 +685,14 @@ class SourceFile:
return rv
@cached_property
- def testdriver_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def testdriver_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
testdriver.js script"""
assert self.root is not None
return self.root.findall(".//{http://www.w3.org/1999/xhtml}script[@src='/resources/testdriver.js']")
@cached_property
- def has_testdriver(self):
- # type: () -> Optional[bool]
+ def has_testdriver(self) -> Optional[bool]:
"""Boolean indicating whether the file content represents a
testharness.js test"""
if self.root is None:
@@ -772,8 +700,7 @@ class SourceFile:
return bool(self.testdriver_nodes)
@cached_property
- def reftest_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def reftest_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
to a reftest <link>"""
if self.root is None:
@@ -784,11 +711,10 @@ class SourceFile:
return match_links + mismatch_links
@cached_property
- def references(self):
- # type: () -> List[Tuple[Text, Text]]
+ def references(self) -> List[Tuple[Text, Text]]:
"""List of (ref_url, relation) tuples for any reftest references specified in
the file"""
- rv = [] # type: List[Tuple[Text, Text]]
+ rv: List[Tuple[Text, Text]] = []
rel_map = {"match": "==", "mismatch": "!="}
for item in self.reftest_nodes:
if "href" in item.attrib:
@@ -798,15 +724,13 @@ class SourceFile:
return rv
@cached_property
- def content_is_ref_node(self):
- # type: () -> bool
+ def content_is_ref_node(self) -> bool:
"""Boolean indicating whether the file is a non-leaf node in a reftest
graph (i.e. if it contains any <link rel=[mis]match>"""
return bool(self.references)
@cached_property
- def css_flag_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def css_flag_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
flag <meta>"""
if self.root is None:
@@ -814,10 +738,9 @@ class SourceFile:
return self.root.findall(".//{http://www.w3.org/1999/xhtml}meta[@name='flags']")
@cached_property
- def css_flags(self):
- # type: () -> Set[Text]
+ def css_flags(self) -> Set[Text]:
"""Set of flags specified in the file"""
- rv = set() # type: Set[Text]
+ rv: Set[Text] = set()
for item in self.css_flag_nodes:
if "content" in item.attrib:
for flag in item.attrib["content"].split():
@@ -825,8 +748,7 @@ class SourceFile:
return rv
@cached_property
- def content_is_css_manual(self):
- # type: () -> Optional[bool]
+ def content_is_css_manual(self) -> Optional[bool]:
"""Boolean indicating whether the file content represents a
CSS WG-style manual test"""
if self.root is None:
@@ -835,8 +757,7 @@ class SourceFile:
return bool(self.css_flags & {"animated", "font", "history", "interact", "paged", "speech", "userstyle"})
@cached_property
- def spec_link_nodes(self):
- # type: () -> List[ElementTree.Element]
+ def spec_link_nodes(self) -> List[ElementTree.Element]:
"""List of ElementTree Elements corresponding to nodes representing a
<link rel=help>, used to point to specs"""
if self.root is None:
@@ -844,18 +765,16 @@ class SourceFile:
return self.root.findall(".//{http://www.w3.org/1999/xhtml}link[@rel='help']")
@cached_property
- def spec_links(self):
- # type: () -> Set[Text]
+ def spec_links(self) -> Set[Text]:
"""Set of spec links specified in the file"""
- rv = set() # type: Set[Text]
+ rv: Set[Text] = set()
for item in self.spec_link_nodes:
if "href" in item.attrib:
rv.add(item.attrib["href"].strip(space_chars))
return rv
@cached_property
- def content_is_css_visual(self):
- # type: () -> Optional[bool]
+ def content_is_css_visual(self) -> Optional[bool]:
"""Boolean indicating whether the file content represents a
CSS WG-style visual test"""
if self.root is None:
@@ -864,8 +783,7 @@ class SourceFile:
self.spec_links)
@property
- def type(self):
- # type: () -> Text
+ def type(self) -> Text:
possible_types = self.possible_types
if len(possible_types) == 1:
return possible_types.pop()
@@ -874,8 +792,7 @@ class SourceFile:
return rv
@property
- def possible_types(self):
- # type: () -> Set[Text]
+ def possible_types(self) -> Set[Text]:
"""Determines the set of possible types without reading the file"""
if self.items_cache:
@@ -928,8 +845,7 @@ class SourceFile:
RefTest.item_type,
SupportFile.item_type}
- def manifest_items(self):
- # type: () -> Tuple[Text, List[ManifestItem]]
+ def manifest_items(self) -> Tuple[Text, List[ManifestItem]]:
"""List of manifest items corresponding to the file. There is typically one
per test, but in the case of reftests a node may have corresponding manifest
items without being a test itself."""
@@ -940,11 +856,11 @@ class SourceFile:
drop_cached = "root" not in self.__dict__
if self.name_is_non_test:
- rv = "support", [
+ rv: Tuple[Text, List[ManifestItem]] = ("support", [
SupportFile(
self.tests_root,
self.rel_path
- )] # type: Tuple[Text, List[ManifestItem]]
+ )])
elif self.name_is_manual:
rv = ManualTest.item_type, [
@@ -1026,7 +942,7 @@ class SourceFile:
globals = value
break
- tests = [
+ tests: List[ManifestItem] = [
TestharnessTest(
self.tests_root,
self.rel_path,
@@ -1039,7 +955,7 @@ class SourceFile:
)
for (suffix, jsshell) in sorted(global_suffixes(globals))
for variant in self.test_variants
- ] # type: List[ManifestItem]
+ ]
rv = TestharnessTest.item_type, tests
elif self.name_is_worker:
diff --git a/tests/wpt/web-platform-tests/tools/manifest/testpaths.py b/tests/wpt/web-platform-tests/tools/manifest/testpaths.py
index 6902f0c0633..2fa5393826d 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/testpaths.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/testpaths.py
@@ -2,31 +2,21 @@ import argparse
import json
import os
from collections import defaultdict
+from typing import Any, Dict, Iterable, List, Text
from .manifest import load_and_update, Manifest
from .log import get_logger
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Dict
- from typing import Iterable
- from typing import List
- from typing import Text
-
wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
logger = get_logger()
-def abs_path(path):
- # type: (str) -> str
+def abs_path(path: str) -> str:
return os.path.abspath(os.path.expanduser(path))
-def create_parser():
- # type: () -> argparse.ArgumentParser
+def create_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument(
"-p", "--path", type=abs_path, help="Path to manifest file.")
@@ -55,10 +45,9 @@ def create_parser():
return parser
-def get_path_id_map(src_root, tests_root, manifest_file, test_ids):
- # type: (Text, Text, Manifest, Iterable[Text]) -> Dict[Text, List[Text]]
+def get_path_id_map(src_root: Text, tests_root: Text, manifest_file: Manifest, test_ids: Iterable[Text]) -> Dict[Text, List[Text]]:
test_ids = set(test_ids)
- path_id_map = defaultdict(list) # type: Dict[Text, List[Text]]
+ path_id_map: Dict[Text, List[Text]] = defaultdict(list)
compute_rel_path = src_root != tests_root
@@ -74,8 +63,7 @@ def get_path_id_map(src_root, tests_root, manifest_file, test_ids):
return path_id_map
-def get_paths(**kwargs):
- # type: (**Any) -> Dict[Text, List[Text]]
+def get_paths(**kwargs: Any) -> Dict[Text, List[Text]]:
tests_root = kwargs["tests_root"]
assert tests_root is not None
path = kwargs["path"]
@@ -95,8 +83,7 @@ def get_paths(**kwargs):
return get_path_id_map(src_root, tests_root, manifest_file, kwargs["test_ids"])
-def write_output(path_id_map, as_json):
- # type: (Dict[Text, List[Text]], bool) -> None
+def write_output(path_id_map: Dict[Text, List[Text]], as_json: bool) -> None:
if as_json:
print(json.dumps(path_id_map))
else:
@@ -106,7 +93,6 @@ def write_output(path_id_map, as_json):
print(" " + test_id)
-def run(**kwargs):
- # type: (**Any) -> None
+def run(**kwargs: Any) -> None:
path_id_map = get_paths(**kwargs)
write_output(path_id_map, as_json=kwargs["json"])
diff --git a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
index 73a6c7e1421..91b39f213a8 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/tests/test_manifest.py
@@ -10,15 +10,10 @@ import pytest
from .. import manifest, sourcefile, item, utils
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Type
+from typing import Any, Type
-def SourceFileWithTest(path, hash, cls, **kwargs):
- # type: (str, str, Type[item.ManifestItem], **Any) -> sourcefile.SourceFile
+def SourceFileWithTest(path: str, hash: str, cls: Type[item.ManifestItem], **kwargs: Any) -> sourcefile.SourceFile:
rel_path_parts = tuple(path.split(os.path.sep))
s = mock.Mock(rel_path=path,
rel_path_parts=rel_path_parts,
@@ -32,8 +27,7 @@ def SourceFileWithTest(path, hash, cls, **kwargs):
return s # type: ignore
-def SourceFileWithTests(path, hash, cls, variants):
- # type: (str, str, Type[item.URLManifestItem], **Any) -> sourcefile.SourceFile
+def SourceFileWithTests(path: str, hash: str, cls: Type[item.URLManifestItem], variants: Any) -> sourcefile.SourceFile:
rel_path_parts = tuple(path.split(os.path.sep))
s = mock.Mock(rel_path=path,
rel_path_parts=rel_path_parts,
diff --git a/tests/wpt/web-platform-tests/tools/manifest/typedata.py b/tests/wpt/web-platform-tests/tools/manifest/typedata.py
index 4061c9e610b..746a42c98cf 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/typedata.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/typedata.py
@@ -1,36 +1,18 @@
-from collections.abc import MutableMapping
-
-
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Dict
- from typing import Iterator
- from typing import List
- from typing import Optional
- from typing import Set
- from typing import Text
- from typing import Tuple
- from typing import Type
- from typing import Union
+from typing import (Any, Dict, Iterator, List, Optional, MutableMapping, Set, Text, Tuple,
+ Type, TYPE_CHECKING, Union)
- # avoid actually importing these, they're only used by type comments
- from . import item
- from . import manifest
+from .item import ManifestItem
+if TYPE_CHECKING:
+ # avoid actually importing these, they're only used by type comments
+ from .manifest import Manifest
-if MYPY:
- TypeDataType = MutableMapping[Tuple[str, ...], Set[item.ManifestItem]]
- PathHashType = MutableMapping[Tuple[str, ...], str]
-else:
- TypeDataType = MutableMapping
- PathHashType = MutableMapping
+TypeDataType = MutableMapping[Tuple[str, ...], Set[ManifestItem]]
+PathHashType = MutableMapping[Tuple[str, ...], str]
class TypeData(TypeDataType):
- def __init__(self, m, type_cls):
- # type: (manifest.Manifest, Type[item.ManifestItem]) -> None
+ def __init__(self, m: "Manifest", type_cls: Type[ManifestItem]) -> None:
"""Dict-like object containing the TestItems for each test type.
Loading an actual Item class for each test is unnecessarily
@@ -42,14 +24,13 @@ class TypeData(TypeDataType):
from iteration, we do egerly load all items when iterating
over the class."""
self._manifest = m
- self._type_cls = type_cls # type: Type[item.ManifestItem]
- self._json_data = {} # type: Dict[Text, Any]
- self._data = {} # type: Dict[Text, Any]
- self._hashes = {} # type: Dict[Tuple[Text, ...], Text]
+ self._type_cls: Type[ManifestItem] = type_cls
+ self._json_data: Dict[Text, Any] = {}
+ self._data: Dict[Text, Any] = {}
+ self._hashes: Dict[Tuple[Text, ...], Text] = {}
self.hashes = PathHash(self)
- def _delete_node(self, data, key):
- # type: (Dict[Text, Any], Tuple[Text, ...]) -> None
+ def _delete_node(self, data: Dict[Text, Any], key: Tuple[Text, ...]) -> None:
"""delete a path from a Dict data with a given key"""
path = []
node = data
@@ -67,9 +48,8 @@ class TypeData(TypeDataType):
else:
break
- def __getitem__(self, key):
- # type: (Tuple[Text, ...]) -> Set[item.ManifestItem]
- node = self._data # type: Union[Dict[Text, Any], Set[item.ManifestItem], List[Any]]
+ def __getitem__(self, key: Tuple[Text, ...]) -> Set[ManifestItem]:
+ node: Union[Dict[Text, Any], Set[ManifestItem], List[Any]] = self._data
for pathseg in key:
if isinstance(node, dict) and pathseg in node:
node = node[pathseg]
@@ -117,8 +97,7 @@ class TypeData(TypeDataType):
return data
- def __setitem__(self, key, value):
- # type: (Tuple[Text, ...], Set[item.ManifestItem]) -> None
+ def __setitem__(self, key: Tuple[Text, ...], value: Set[ManifestItem]) -> None:
try:
self._delete_node(self._json_data, key)
except KeyError:
@@ -131,8 +110,7 @@ class TypeData(TypeDataType):
raise KeyError(f"{key!r} is a child of a test ({key[:i+1]!r})")
node[key[-1]] = value
- def __delitem__(self, key):
- # type: (Tuple[Text, ...]) -> None
+ def __delitem__(self, key: Tuple[Text, ...]) -> None:
try:
self._delete_node(self._data, key)
except KeyError:
@@ -143,12 +121,11 @@ class TypeData(TypeDataType):
except KeyError:
pass
- def __iter__(self):
- # type: () -> Iterator[Tuple[Text, ...]]
+ def __iter__(self) -> Iterator[Tuple[Text, ...]]:
"""Iterator over keys in the TypeData in codepoint order"""
- data_node = self._data # type: Optional[Union[Dict[Text, Any], Set[item.ManifestItem]]]
- json_node = self._json_data # type: Optional[Union[Dict[Text, Any], List[Any]]]
- path = tuple() # type: Tuple[Text, ...]
+ data_node: Optional[Union[Dict[Text, Any], Set[ManifestItem]]] = self._data
+ json_node: Optional[Union[Dict[Text, Any], List[Any]]] = self._json_data
+ path: Tuple[Text, ...] = tuple()
stack = [(data_node, json_node, path)]
while stack:
data_node, json_node, path = stack.pop()
@@ -159,7 +136,7 @@ class TypeData(TypeDataType):
assert data_node is None or isinstance(data_node, dict)
assert json_node is None or isinstance(json_node, dict)
- keys = set() # type: Set[Text]
+ keys: Set[Text] = set()
if data_node is not None:
keys |= set(iter(data_node))
if json_node is not None:
@@ -170,11 +147,10 @@ class TypeData(TypeDataType):
json_node.get(key) if json_node is not None else None,
path + (key,)))
- def __len__(self):
- # type: () -> int
+ def __len__(self) -> int:
count = 0
- stack = [self._data] # type: List[Union[Dict[Text, Any], Set[item.ManifestItem]]]
+ stack: List[Union[Dict[Text, Any], Set[ManifestItem]]] = [self._data]
while stack:
v = stack.pop()
if isinstance(v, set):
@@ -182,7 +158,7 @@ class TypeData(TypeDataType):
else:
stack.extend(v.values())
- json_stack = [self._json_data] # type: List[Union[Dict[Text, Any], List[Any]]]
+ json_stack: List[Union[Dict[Text, Any], List[Any]]] = [self._json_data]
while json_stack:
json_v = json_stack.pop()
if isinstance(json_v, list):
@@ -192,14 +168,12 @@ class TypeData(TypeDataType):
return count
- def __nonzero__(self):
- # type: () -> bool
+ def __nonzero__(self) -> bool:
return bool(self._data) or bool(self._json_data)
__bool__ = __nonzero__
- def __contains__(self, key):
- # type: (Any) -> bool
+ def __contains__(self, key: Any) -> bool:
# we provide our own impl of this to avoid calling __getitem__ and generating items for
# those in self._json_data
node = self._data
@@ -222,15 +196,13 @@ class TypeData(TypeDataType):
return False
- def clear(self):
- # type: () -> None
+ def clear(self) -> None:
# much, much simpler/quicker than that defined in MutableMapping
self._json_data.clear()
self._data.clear()
self._hashes.clear()
- def set_json(self, json_data):
- # type: (Dict[Text, Any]) -> None
+ def set_json(self, json_data: Dict[Text, Any]) -> None:
"""Provide the object with a raw JSON blob
Note that this object graph is assumed to be owned by the TypeData
@@ -242,8 +214,7 @@ class TypeData(TypeDataType):
self._json_data = json_data
- def to_json(self):
- # type: () -> Dict[Text, Any]
+ def to_json(self) -> Dict[Text, Any]:
"""Convert the current data to JSON
Note that the returned object may contain references to the internal
@@ -254,15 +225,14 @@ class TypeData(TypeDataType):
"""
json_rv = self._json_data.copy()
- def safe_sorter(element):
- # type: (Tuple[str,str]) -> Tuple[str,str]
+ def safe_sorter(element: Tuple[str,str]) -> Tuple[str,str]:
"""key function to sort lists with None values."""
if element and not element[0]:
return ("", element[1])
else:
return element
- stack = [(self._data, json_rv, tuple())] # type: List[Tuple[Dict[Text, Any], Dict[Text, Any], Tuple[Text, ...]]]
+ stack: List[Tuple[Dict[Text, Any], Dict[Text, Any], Tuple[Text, ...]]] = [(self._data, json_rv, tuple())]
while stack:
data_node, json_node, par_full_key = stack.pop()
for k, v in data_node.items():
@@ -279,12 +249,10 @@ class TypeData(TypeDataType):
class PathHash(PathHashType):
- def __init__(self, data):
- # type: (TypeData) -> None
+ def __init__(self, data: TypeData) -> None:
self._data = data
- def __getitem__(self, k):
- # type: (Tuple[Text, ...]) -> Text
+ def __getitem__(self, k: Tuple[Text, ...]) -> Text:
if k not in self._data:
raise KeyError
@@ -303,8 +271,7 @@ class PathHash(PathHashType):
assert False, "unreachable"
raise KeyError
- def __setitem__(self, k, v):
- # type: (Tuple[Text, ...], Text) -> None
+ def __setitem__(self, k: Tuple[Text, ...], v: Text) -> None:
if k not in self._data:
raise KeyError
@@ -323,14 +290,11 @@ class PathHash(PathHashType):
self._data._hashes[k] = v
- def __delitem__(self, k):
- # type: (Tuple[Text, ...]) -> None
+ def __delitem__(self, k: Tuple[Text, ...]) -> None:
raise ValueError("keys here must match underlying data")
- def __iter__(self):
- # type: () -> Iterator[Tuple[Text, ...]]
+ def __iter__(self) -> Iterator[Tuple[Text, ...]]:
return iter(self._data)
- def __len__(self):
- # type: () -> int
+ def __len__(self) -> int:
return len(self._data)
diff --git a/tests/wpt/web-platform-tests/tools/manifest/update.py b/tests/wpt/web-platform-tests/tools/manifest/update.py
index d7ef2082ebf..fef0b96b869 100755
--- a/tests/wpt/web-platform-tests/tools/manifest/update.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/update.py
@@ -1,11 +1,15 @@
#!/usr/bin/env python3
import argparse
import os
+from typing import Any, Optional, TYPE_CHECKING
from . import manifest
from . import vcs
from .log import get_logger, enable_debug_logging
from .download import download_from_github
+if TYPE_CHECKING:
+ from .manifest import Manifest # avoid cyclic import
+
here = os.path.dirname(__file__)
@@ -13,23 +17,15 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
logger = get_logger()
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Optional
- from .manifest import Manifest # avoid cyclic import
-
-def update(tests_root, # type: str
- manifest, # type: Manifest
- manifest_path=None, # type: Optional[str]
- working_copy=True, # type: bool
- cache_root=None, # type: Optional[str]
- rebuild=False, # type: bool
- parallel=True # type: bool
- ):
- # type: (...) -> bool
+def update(tests_root: str,
+ manifest: "Manifest",
+ manifest_path: Optional[str] = None,
+ working_copy: bool = True,
+ cache_root: Optional[str] = None,
+ rebuild: bool = False,
+ parallel: bool = True
+ ) -> bool:
logger.warning("Deprecated; use manifest.load_and_update instead")
logger.info("Updating manifest")
@@ -38,8 +34,7 @@ def update(tests_root, # type: str
return manifest.update(tree, parallel)
-def update_from_cli(**kwargs):
- # type: (**Any) -> None
+def update_from_cli(**kwargs: Any) -> None:
tests_root = kwargs["tests_root"]
path = kwargs["path"]
assert tests_root is not None
@@ -56,13 +51,11 @@ def update_from_cli(**kwargs):
parallel=kwargs["parallel"])
-def abs_path(path):
- # type: (str) -> str
+def abs_path(path: str) -> str:
return os.path.abspath(os.path.expanduser(path))
-def create_parser():
- # type: () -> argparse.ArgumentParser
+def create_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument(
"-v", "--verbose", dest="verbose", action="store_true", default=False,
@@ -89,8 +82,7 @@ def create_parser():
return parser
-def run(*args, **kwargs):
- # type: (*Any, **Any) -> None
+def run(*args: Any, **kwargs: Any) -> None:
if kwargs["path"] is None:
kwargs["path"] = os.path.join(kwargs["tests_root"], "MANIFEST.json")
if kwargs["verbose"]:
@@ -98,8 +90,7 @@ def run(*args, **kwargs):
update_from_cli(**kwargs)
-def main():
- # type: () -> None
+def main() -> None:
opts = create_parser().parse_args()
run(**vars(opts))
diff --git a/tests/wpt/web-platform-tests/tools/manifest/utils.py b/tests/wpt/web-platform-tests/tools/manifest/utils.py
index 59ddb663784..7ccd3afb71e 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/utils.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/utils.py
@@ -1,26 +1,11 @@
import os
import subprocess
import sys
+from typing import Any, Callable, Generic, Optional, Text, TypeVar
+T = TypeVar("T")
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Text
- from typing import Callable
- from typing import Any
- from typing import Generic
- from typing import TypeVar
- from typing import Optional
- T = TypeVar("T")
-else:
- # eww, eww, ewwww
- Generic = {}
- T = object()
- Generic[T] = object
-
-def rel_path_to_url(rel_path, url_base="/"):
- # type: (Text, Text) -> Text
+def rel_path_to_url(rel_path: Text, url_base: Text = "/") -> Text:
assert not os.path.isabs(rel_path), rel_path
if url_base[0] != "/":
url_base = "/" + url_base
@@ -29,8 +14,7 @@ def rel_path_to_url(rel_path, url_base="/"):
return url_base + rel_path.replace(os.sep, "/")
-def from_os_path(path):
- # type: (Text) -> Text
+def from_os_path(path: Text) -> Text:
assert os.path.sep == "/" or sys.platform == "win32"
if "/" == os.path.sep:
rv = path
@@ -41,8 +25,7 @@ def from_os_path(path):
return rv
-def to_os_path(path):
- # type: (Text) -> Text
+def to_os_path(path: Text) -> Text:
assert os.path.sep == "/" or sys.platform == "win32"
if "\\" in path:
raise ValueError("normalised path contains \\")
@@ -51,10 +34,8 @@ def to_os_path(path):
return path.replace("/", os.path.sep)
-def git(path):
- # type: (Text) -> Optional[Callable[..., Text]]
- def gitfunc(cmd, *args):
- # type: (Text, *Text) -> Text
+def git(path: Text) -> Optional[Callable[..., Text]]:
+ def gitfunc(cmd: Text, *args: Text) -> Text:
full_cmd = ["git", cmd] + list(args)
try:
return subprocess.check_output(full_cmd, cwd=path, stderr=subprocess.STDOUT).decode('utf8')
@@ -75,14 +56,12 @@ def git(path):
class cached_property(Generic[T]):
- def __init__(self, func):
- # type: (Callable[[Any], T]) -> None
+ def __init__(self, func: Callable[[Any], T]) -> None:
self.func = func
self.__doc__ = getattr(func, "__doc__")
self.name = func.__name__
- def __get__(self, obj, cls=None):
- # type: (Any, Optional[type]) -> T
+ def __get__(self, obj: Any, cls: Optional[type] = None) -> T:
if obj is None:
return self # type: ignore
diff --git a/tests/wpt/web-platform-tests/tools/manifest/vcs.py b/tests/wpt/web-platform-tests/tools/manifest/vcs.py
index ec59f42a311..554e68ab65f 100644
--- a/tests/wpt/web-platform-tests/tools/manifest/vcs.py
+++ b/tests/wpt/web-platform-tests/tools/manifest/vcs.py
@@ -2,7 +2,9 @@ import abc
import os
import stat
from collections import deque
-from collections.abc import MutableMapping
+from os import stat_result
+from typing import (Any, Dict, Iterable, Iterator, List, MutableMapping, Optional, Set, Text, Tuple,
+ TYPE_CHECKING)
from . import jsonlib
from .utils import git
@@ -12,21 +14,18 @@ from .utils import git
from gitignore import gitignore # type: ignore
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Dict, Optional, List, Set, Text, Iterable, Any, Tuple, Iterator
- from .manifest import Manifest # cyclic import under MYPY guard
- stat_result = os.stat_result
+if TYPE_CHECKING:
+ from .manifest import Manifest # avoid cyclic import
- GitIgnoreCacheType = MutableMapping[bytes, bool]
-else:
- GitIgnoreCacheType = MutableMapping
+GitIgnoreCacheType = MutableMapping[bytes, bool]
-def get_tree(tests_root, manifest, manifest_path, cache_root,
- working_copy=True, rebuild=False):
- # type: (Text, Manifest, Optional[Text], Optional[Text], bool, bool) -> FileSystem
+def get_tree(tests_root: Text,
+ manifest: "Manifest",
+ manifest_path: Optional[Text],
+ cache_root: Optional[Text],
+ working_copy: bool = True,
+ rebuild: bool = False) -> "FileSystem":
tree = None
if cache_root is None:
cache_root = os.path.join(tests_root, ".wptcache")
@@ -49,12 +48,10 @@ def get_tree(tests_root, manifest, manifest_path, cache_root,
class GitHasher:
- def __init__(self, path):
- # type: (Text) -> None
+ def __init__(self, path: Text) -> None:
self.git = git(path)
- def _local_changes(self):
- # type: () -> Set[Text]
+ def _local_changes(self) -> Set[Text]:
"""get a set of files which have changed between HEAD and working copy"""
assert self.git is not None
# note that git runs the command with tests_root as the cwd, which may
@@ -63,12 +60,11 @@ class GitHasher:
data = self.git(*cmd)
return set(data.split("\0"))
- def hash_cache(self):
- # type: () -> Dict[Text, Optional[Text]]
+ def hash_cache(self) -> Dict[Text, Optional[Text]]:
"""
A dict of rel_path -> current git object id if the working tree matches HEAD else None
"""
- hash_cache = {} # type: Dict[Text, Optional[Text]]
+ hash_cache: Dict[Text, Optional[Text]] = {}
if self.git is None:
return hash_cache
@@ -86,8 +82,12 @@ class GitHasher:
class FileSystem:
- def __init__(self, tests_root, url_base, cache_path, manifest_path=None, rebuild=False):
- # type: (Text, Text, Optional[Text], Optional[Text], bool) -> None
+ def __init__(self,
+ tests_root: Text,
+ url_base: Text,
+ cache_path: Optional[Text],
+ manifest_path: Optional[Text] = None,
+ rebuild: bool = False) -> None:
self.tests_root = tests_root
self.url_base = url_base
self.ignore_cache = None
@@ -104,8 +104,7 @@ class FileSystem:
git = GitHasher(tests_root)
self.hash_cache = git.hash_cache()
- def __iter__(self):
- # type: () -> Iterator[Tuple[Text, Optional[Text], bool]]
+ def __iter__(self) -> Iterator[Tuple[Text, Optional[Text], bool]]:
mtime_cache = self.mtime_cache
for dirpath, dirnames, filenames in self.path_filter(
walk(self.tests_root.encode("utf8"))):
@@ -117,16 +116,14 @@ class FileSystem:
else:
yield path, None, False
- def dump_caches(self):
- # type: () -> None
+ def dump_caches(self) -> None:
for cache in [self.mtime_cache, self.ignore_cache]:
if cache is not None:
cache.dump()
class CacheFile(metaclass=abc.ABCMeta):
- def __init__(self, cache_root, tests_root, rebuild=False):
- # type: (Text, Text, bool) -> None
+ def __init__(self, cache_root: Text, tests_root: Text, rebuild: bool = False) -> None:
self.tests_root = tests_root
if not os.path.exists(cache_root):
os.makedirs(cache_root)
@@ -135,20 +132,17 @@ class CacheFile(metaclass=abc.ABCMeta):
self.data = self.load(rebuild)
@abc.abstractproperty
- def file_name(self):
- # type: () -> Text
+ def file_name(self) -> Text:
pass
- def dump(self):
- # type: () -> None
+ def dump(self) -> None:
if not self.modified:
return
with open(self.path, 'w') as f:
jsonlib.dump_local(self.data, f)
- def load(self, rebuild=False):
- # type: (bool) -> Dict[Text, Any]
- data = {} # type: Dict[Text, Any]
+ def load(self, rebuild: bool = False) -> Dict[Text, Any]:
+ data: Dict[Text, Any] = {}
try:
if not rebuild:
with open(self.path) as f:
@@ -161,8 +155,7 @@ class CacheFile(metaclass=abc.ABCMeta):
pass
return data
- def check_valid(self, data):
- # type: (Dict[Text, Any]) -> Dict[Text, Any]
+ def check_valid(self, data: Dict[Text, Any]) -> Dict[Text, Any]:
"""Check if the cached data is valid and return an updated copy of the
cache containing only data that can be used."""
return data
@@ -171,13 +164,11 @@ class CacheFile(metaclass=abc.ABCMeta):
class MtimeCache(CacheFile):
file_name = "mtime.json"
- def __init__(self, cache_root, tests_root, manifest_path, rebuild=False):
- # type: (Text, Text, Text, bool) -> None
+ def __init__(self, cache_root: Text, tests_root: Text, manifest_path: Text, rebuild: bool = False) -> None:
self.manifest_path = manifest_path
super().__init__(cache_root, tests_root, rebuild)
- def updated(self, rel_path, stat):
- # type: (Text, stat_result) -> bool
+ def updated(self, rel_path: Text, stat: stat_result) -> bool:
"""Return a boolean indicating whether the file changed since the cache was last updated.
This implicitly updates the cache with the new mtime data."""
@@ -188,8 +179,7 @@ class MtimeCache(CacheFile):
return True
return False
- def check_valid(self, data):
- # type: (Dict[Any, Any]) -> Dict[Any, Any]
+ def check_valid(self, data: Dict[Any, Any]) -> Dict[Any, Any]:
if data.get("/tests_root") != self.tests_root:
self.modified = True
else:
@@ -204,8 +194,7 @@ class MtimeCache(CacheFile):
data["/tests_root"] = self.tests_root
return data
- def dump(self):
- # type: () -> None
+ def dump(self) -> None:
if self.manifest_path is None:
raise ValueError
if not os.path.exists(self.manifest_path):
@@ -219,8 +208,7 @@ class MtimeCache(CacheFile):
class GitIgnoreCache(CacheFile, GitIgnoreCacheType):
file_name = "gitignore2.json"
- def check_valid(self, data):
- # type: (Dict[Any, Any]) -> Dict[Any, Any]
+ def check_valid(self, data: Dict[Any, Any]) -> Dict[Any, Any]:
ignore_path = os.path.join(self.tests_root, ".gitignore")
mtime = os.path.getmtime(ignore_path)
if data.get("/gitignore_file") != [ignore_path, mtime]:
@@ -229,8 +217,7 @@ class GitIgnoreCache(CacheFile, GitIgnoreCacheType):
data["/gitignore_file"] = [ignore_path, mtime]
return data
- def __contains__(self, key):
- # type: (Any) -> bool
+ def __contains__(self, key: Any) -> bool:
try:
key = key.decode("utf-8")
except Exception:
@@ -238,36 +225,30 @@ class GitIgnoreCache(CacheFile, GitIgnoreCacheType):
return key in self.data
- def __getitem__(self, key):
- # type: (bytes) -> bool
+ def __getitem__(self, key: bytes) -> bool:
real_key = key.decode("utf-8")
v = self.data[real_key]
assert isinstance(v, bool)
return v
- def __setitem__(self, key, value):
- # type: (bytes, bool) -> None
+ def __setitem__(self, key: bytes, value: bool) -> None:
real_key = key.decode("utf-8")
if self.data.get(real_key) != value:
self.modified = True
self.data[real_key] = value
- def __delitem__(self, key):
- # type: (bytes) -> None
+ def __delitem__(self, key: bytes) -> None:
real_key = key.decode("utf-8")
del self.data[real_key]
- def __iter__(self):
- # type: () -> Iterator[bytes]
+ def __iter__(self) -> Iterator[bytes]:
return (key.encode("utf-8") for key in self.data)
- def __len__(self):
- # type: () -> int
+ def __len__(self) -> int:
return len(self.data)
-def walk(root):
- # type: (bytes) -> Iterable[Tuple[bytes, List[Tuple[bytes, stat_result]], List[Tuple[bytes, stat_result]]]]
+def walk(root: bytes) -> Iterable[Tuple[bytes, List[Tuple[bytes, stat_result]], List[Tuple[bytes, stat_result]]]]:
"""Re-implementation of os.walk. Returns an iterator over
(dirpath, dirnames, filenames), with some semantic differences
to os.walk.
diff --git a/tests/wpt/web-platform-tests/tools/requirements_flake8.txt b/tests/wpt/web-platform-tests/tools/requirements_flake8.txt
index 93cacd43845..949ae954845 100644
--- a/tests/wpt/web-platform-tests/tools/requirements_flake8.txt
+++ b/tests/wpt/web-platform-tests/tools/requirements_flake8.txt
@@ -1,4 +1,7 @@
-flake8==4.0.1
-pycodestyle==2.8.0
-pyflakes==2.4.0
-pep8-naming==0.13.0
+flake8==5.0.4; python_version < '3.9'
+pycodestyle==2.9.1; python_version < '3.8'
+pyflakes==2.5.0; python_version < '3.8'
+flake8==6.0.0; python_version >= '3.9'
+pycodestyle==2.10.0; python_version >= '3.9'
+pyflakes==3.0.1; python_version >= '3.9'
+pep8-naming==0.13.3
diff --git a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt
index af7de298c9f..1044bca9407 100644
--- a/tests/wpt/web-platform-tests/tools/requirements_mypy.txt
+++ b/tests/wpt/web-platform-tests/tools/requirements_mypy.txt
@@ -7,8 +7,8 @@ types-atomicwrites==1.4.5.1
types-python-dateutil==2.8.19.12
types-PyYAML==6.0.12.9
types-requests==2.28.11.17
-types-setuptools==67.6.0.8
+types-setuptools==67.7.0.1
types-six==1.16.21.8
-types-ujson==5.7.0.4
+types-ujson==5.7.0.5
types-urllib3==1.26.25.11
typing_extensions==4.5.0
diff --git a/tests/wpt/web-platform-tests/tools/requirements_pytest.txt b/tests/wpt/web-platform-tests/tools/requirements_pytest.txt
index 5039de986ec..4fcbab6c702 100644
--- a/tests/wpt/web-platform-tests/tools/requirements_pytest.txt
+++ b/tests/wpt/web-platform-tests/tools/requirements_pytest.txt
@@ -1,3 +1,3 @@
pytest==7.3.1
pytest-cov==4.0.0
-hypothesis==6.74.0
+hypothesis==6.75.1
diff --git a/tests/wpt/web-platform-tests/tools/requirements_tests.txt b/tests/wpt/web-platform-tests/tools/requirements_tests.txt
index 63f0b39b546..8a4b54f4dcd 100644
--- a/tests/wpt/web-platform-tests/tools/requirements_tests.txt
+++ b/tests/wpt/web-platform-tests/tools/requirements_tests.txt
@@ -2,4 +2,4 @@ httpx[http2]==0.24.0
json-e==4.5.2
jsonschema==4.17.3
pyyaml==6.0
-taskcluster==49.1.2
+taskcluster==49.1.3
diff --git a/tests/wpt/web-platform-tests/tools/serve/serve.py b/tests/wpt/web-platform-tests/tools/serve/serve.py
index 52a0eae428d..e5aa5f0d896 100644
--- a/tests/wpt/web-platform-tests/tools/serve/serve.py
+++ b/tests/wpt/web-platform-tests/tools/serve/serve.py
@@ -19,7 +19,7 @@ from collections import defaultdict, OrderedDict
from io import IOBase
from itertools import chain, product
from html5lib import html5parser
-from typing import ClassVar, List, Set, Tuple
+from typing import ClassVar, List, Optional, Set, Tuple
from localpaths import repo_root # type: ignore
@@ -97,7 +97,7 @@ class WrapperHandler:
__meta__ = abc.ABCMeta
- headers = [] # type: ClassVar[List[Tuple[str, str]]]
+ headers: ClassVar[List[Tuple[str, str]]] = []
def __init__(self, base_path=None, url_base="/"):
self.base_path = base_path
@@ -214,18 +214,18 @@ class WrapperHandler:
class HtmlWrapperHandler(WrapperHandler):
- global_type = None # type: ClassVar[str]
+ global_type: ClassVar[Optional[str]] = None
headers = [('Content-Type', 'text/html')]
def check_exposure(self, request):
- if self.global_type:
- globals = ""
+ if self.global_type is not None:
+ global_variants = ""
for (key, value) in self._get_metadata(request):
if key == "global":
- globals = value
+ global_variants = value
break
- if self.global_type not in parse_variants(globals):
+ if self.global_type not in parse_variants(global_variants):
raise HTTPException(404, "This test cannot be loaded in %s mode" %
self.global_type)
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/MANIFEST.in b/tests/wpt/web-platform-tests/tools/third_party/enum/MANIFEST.in
deleted file mode 100644
index 98fe77f55a2..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/MANIFEST.in
+++ /dev/null
@@ -1,9 +0,0 @@
-exclude enum/*
-include setup.py
-include README
-include enum/__init__.py
-include enum/test.py
-include enum/LICENSE
-include enum/README
-include enum/doc/enum.pdf
-include enum/doc/enum.rst
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/PKG-INFO b/tests/wpt/web-platform-tests/tools/third_party/enum/PKG-INFO
deleted file mode 100644
index 623171e38f6..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/PKG-INFO
+++ /dev/null
@@ -1,60 +0,0 @@
-Metadata-Version: 1.1
-Name: enum34
-Version: 1.1.10
-Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
-Home-page: https://bitbucket.org/stoneleaf/enum34
-Author: Ethan Furman
-Author-email: ethan@stoneleaf.us
-License: BSD License
-Description: enum --- support for enumerations
- ========================================
-
- An enumeration is a set of symbolic names (members) bound to unique, constant
- values. Within an enumeration, the members can be compared by identity, and
- the enumeration itself can be iterated over.
-
- from enum import Enum
-
- class Fruit(Enum):
- apple = 1
- banana = 2
- orange = 3
-
- list(Fruit)
- # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]
-
- len(Fruit)
- # 3
-
- Fruit.banana
- # <Fruit.banana: 2>
-
- Fruit['banana']
- # <Fruit.banana: 2>
-
- Fruit(2)
- # <Fruit.banana: 2>
-
- Fruit.banana is Fruit['banana'] is Fruit(2)
- # True
-
- Fruit.banana.name
- # 'banana'
-
- Fruit.banana.value
- # 2
-
- Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
-
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Programming Language :: Python
-Classifier: Topic :: Software Development
-Classifier: Programming Language :: Python :: 2.4
-Classifier: Programming Language :: Python :: 2.5
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.3
-Provides: enum
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/README b/tests/wpt/web-platform-tests/tools/third_party/enum/README
deleted file mode 100644
index aa2333d8df6..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/README
+++ /dev/null
@@ -1,3 +0,0 @@
-enum34 is the new Python stdlib enum module available in Python 3.4
-backported for previous versions of Python from 2.4 to 3.3.
-tested on 2.6, 2.7, and 3.3+
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/LICENSE b/tests/wpt/web-platform-tests/tools/third_party/enum/enum/LICENSE
deleted file mode 100644
index 9003b8850e7..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/LICENSE
+++ /dev/null
@@ -1,32 +0,0 @@
-Copyright (c) 2013, Ethan Furman.
-All rights reserved.
-
-Redistribution and use in source and binary forms, with or without
-modification, are permitted provided that the following conditions
-are met:
-
- Redistributions of source code must retain the above
- copyright notice, this list of conditions and the
- following disclaimer.
-
- Redistributions in binary form must reproduce the above
- copyright notice, this list of conditions and the following
- disclaimer in the documentation and/or other materials
- provided with the distribution.
-
- Neither the name Ethan Furman nor the names of any
- contributors may be used to endorse or promote products
- derived from this software without specific prior written
- permission.
-
-THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
-AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
-IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
-ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
-LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
-CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
-SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
-INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
-CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
-ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGE.
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/README b/tests/wpt/web-platform-tests/tools/third_party/enum/enum/README
deleted file mode 100644
index aa2333d8df6..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/README
+++ /dev/null
@@ -1,3 +0,0 @@
-enum34 is the new Python stdlib enum module available in Python 3.4
-backported for previous versions of Python from 2.4 to 3.3.
-tested on 2.6, 2.7, and 3.3+
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/__init__.py b/tests/wpt/web-platform-tests/tools/third_party/enum/enum/__init__.py
deleted file mode 100644
index 51f3cf24706..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/__init__.py
+++ /dev/null
@@ -1,838 +0,0 @@
-"""Python Enumerations"""
-
-import sys as _sys
-
-__all__ = ['Enum', 'IntEnum', 'unique']
-
-version = 1, 1, 10
-
-pyver = float('%s.%s' % _sys.version_info[:2])
-
-try:
- any
-except NameError:
- def any(iterable):
- for element in iterable:
- if element:
- return True
- return False
-
-try:
- from collections import OrderedDict
-except ImportError:
- OrderedDict = None
-
-try:
- basestring
-except NameError:
- # In Python 2 basestring is the ancestor of both str and unicode
- # in Python 3 it's just str, but was missing in 3.1
- basestring = str
-
-try:
- unicode
-except NameError:
- # In Python 3 unicode no longer exists (it's just str)
- unicode = str
-
-class _RouteClassAttributeToGetattr(object):
- """Route attribute access on a class to __getattr__.
-
- This is a descriptor, used to define attributes that act differently when
- accessed through an instance and through a class. Instance access remains
- normal, but access to an attribute through a class will be routed to the
- class's __getattr__ method; this is done by raising AttributeError.
-
- """
- def __init__(self, fget=None):
- self.fget = fget
-
- def __get__(self, instance, ownerclass=None):
- if instance is None:
- raise AttributeError()
- return self.fget(instance)
-
- def __set__(self, instance, value):
- raise AttributeError("can't set attribute")
-
- def __delete__(self, instance):
- raise AttributeError("can't delete attribute")
-
-
-def _is_descriptor(obj):
- """Returns True if obj is a descriptor, False otherwise."""
- return (
- hasattr(obj, '__get__') or
- hasattr(obj, '__set__') or
- hasattr(obj, '__delete__'))
-
-
-def _is_dunder(name):
- """Returns True if a __dunder__ name, False otherwise."""
- return (name[:2] == name[-2:] == '__' and
- name[2:3] != '_' and
- name[-3:-2] != '_' and
- len(name) > 4)
-
-
-def _is_sunder(name):
- """Returns True if a _sunder_ name, False otherwise."""
- return (name[0] == name[-1] == '_' and
- name[1:2] != '_' and
- name[-2:-1] != '_' and
- len(name) > 2)
-
-
-def _make_class_unpicklable(cls):
- """Make the given class un-picklable."""
- def _break_on_call_reduce(self, protocol=None):
- raise TypeError('%r cannot be pickled' % self)
- cls.__reduce_ex__ = _break_on_call_reduce
- cls.__module__ = '<unknown>'
-
-
-class _EnumDict(dict):
- """Track enum member order and ensure member names are not reused.
-
- EnumMeta will use the names found in self._member_names as the
- enumeration member names.
-
- """
- def __init__(self):
- super(_EnumDict, self).__init__()
- self._member_names = []
-
- def __setitem__(self, key, value):
- """Changes anything not dundered or not a descriptor.
-
- If a descriptor is added with the same name as an enum member, the name
- is removed from _member_names (this may leave a hole in the numerical
- sequence of values).
-
- If an enum member name is used twice, an error is raised; duplicate
- values are not checked for.
-
- Single underscore (sunder) names are reserved.
-
- Note: in 3.x __order__ is simply discarded as a not necessary piece
- leftover from 2.x
-
- """
- if pyver >= 3.0 and key in ('_order_', '__order__'):
- return
- elif key == '__order__':
- key = '_order_'
- if _is_sunder(key):
- if key != '_order_':
- raise ValueError('_names_ are reserved for future Enum use')
- elif _is_dunder(key):
- pass
- elif key in self._member_names:
- # descriptor overwriting an enum?
- raise TypeError('Attempted to reuse key: %r' % key)
- elif not _is_descriptor(value):
- if key in self:
- # enum overwriting a descriptor?
- raise TypeError('Key already defined as: %r' % self[key])
- self._member_names.append(key)
- super(_EnumDict, self).__setitem__(key, value)
-
-
-# Dummy value for Enum as EnumMeta explicity checks for it, but of course until
-# EnumMeta finishes running the first time the Enum class doesn't exist. This
-# is also why there are checks in EnumMeta like `if Enum is not None`
-Enum = None
-
-
-class EnumMeta(type):
- """Metaclass for Enum"""
- @classmethod
- def __prepare__(metacls, cls, bases):
- return _EnumDict()
-
- def __new__(metacls, cls, bases, classdict):
- # an Enum class is final once enumeration items have been defined; it
- # cannot be mixed with other types (int, float, etc.) if it has an
- # inherited __new__ unless a new __new__ is defined (or the resulting
- # class will fail).
- if type(classdict) is dict:
- original_dict = classdict
- classdict = _EnumDict()
- for k, v in original_dict.items():
- classdict[k] = v
-
- member_type, first_enum = metacls._get_mixins_(bases)
- __new__, save_new, use_args = metacls._find_new_(classdict, member_type,
- first_enum)
- # save enum items into separate mapping so they don't get baked into
- # the new class
- members = dict((k, classdict[k]) for k in classdict._member_names)
- for name in classdict._member_names:
- del classdict[name]
-
- # py2 support for definition order
- _order_ = classdict.get('_order_')
- if _order_ is None:
- if pyver < 3.0:
- try:
- _order_ = [name for (name, value) in sorted(members.items(), key=lambda item: item[1])]
- except TypeError:
- _order_ = [name for name in sorted(members.keys())]
- else:
- _order_ = classdict._member_names
- else:
- del classdict['_order_']
- if pyver < 3.0:
- if isinstance(_order_, basestring):
- _order_ = _order_.replace(',', ' ').split()
- aliases = [name for name in members if name not in _order_]
- _order_ += aliases
-
- # check for illegal enum names (any others?)
- invalid_names = set(members) & set(['mro'])
- if invalid_names:
- raise ValueError('Invalid enum member name(s): %s' % (
- ', '.join(invalid_names), ))
-
- # save attributes from super classes so we know if we can take
- # the shortcut of storing members in the class dict
- base_attributes = set([a for b in bases for a in b.__dict__])
- # create our new Enum type
- enum_class = super(EnumMeta, metacls).__new__(metacls, cls, bases, classdict)
- enum_class._member_names_ = [] # names in random order
- if OrderedDict is not None:
- enum_class._member_map_ = OrderedDict()
- else:
- enum_class._member_map_ = {} # name->value map
- enum_class._member_type_ = member_type
-
- # Reverse value->name map for hashable values.
- enum_class._value2member_map_ = {}
-
- # instantiate them, checking for duplicates as we go
- # we instantiate first instead of checking for duplicates first in case
- # a custom __new__ is doing something funky with the values -- such as
- # auto-numbering ;)
- if __new__ is None:
- __new__ = enum_class.__new__
- for member_name in _order_:
- value = members[member_name]
- if not isinstance(value, tuple):
- args = (value, )
- else:
- args = value
- if member_type is tuple: # special case for tuple enums
- args = (args, ) # wrap it one more time
- if not use_args or not args:
- enum_member = __new__(enum_class)
- if not hasattr(enum_member, '_value_'):
- enum_member._value_ = value
- else:
- enum_member = __new__(enum_class, *args)
- if not hasattr(enum_member, '_value_'):
- enum_member._value_ = member_type(*args)
- value = enum_member._value_
- enum_member._name_ = member_name
- enum_member.__objclass__ = enum_class
- enum_member.__init__(*args)
- # If another member with the same value was already defined, the
- # new member becomes an alias to the existing one.
- for name, canonical_member in enum_class._member_map_.items():
- if canonical_member.value == enum_member._value_:
- enum_member = canonical_member
- break
- else:
- # Aliases don't appear in member names (only in __members__).
- enum_class._member_names_.append(member_name)
- # performance boost for any member that would not shadow
- # a DynamicClassAttribute (aka _RouteClassAttributeToGetattr)
- if member_name not in base_attributes:
- setattr(enum_class, member_name, enum_member)
- # now add to _member_map_
- enum_class._member_map_[member_name] = enum_member
- try:
- # This may fail if value is not hashable. We can't add the value
- # to the map, and by-value lookups for this value will be
- # linear.
- enum_class._value2member_map_[value] = enum_member
- except TypeError:
- pass
-
-
- # If a custom type is mixed into the Enum, and it does not know how
- # to pickle itself, pickle.dumps will succeed but pickle.loads will
- # fail. Rather than have the error show up later and possibly far
- # from the source, sabotage the pickle protocol for this class so
- # that pickle.dumps also fails.
- #
- # However, if the new class implements its own __reduce_ex__, do not
- # sabotage -- it's on them to make sure it works correctly. We use
- # __reduce_ex__ instead of any of the others as it is preferred by
- # pickle over __reduce__, and it handles all pickle protocols.
- unpicklable = False
- if '__reduce_ex__' not in classdict:
- if member_type is not object:
- methods = ('__getnewargs_ex__', '__getnewargs__',
- '__reduce_ex__', '__reduce__')
- if not any(m in member_type.__dict__ for m in methods):
- _make_class_unpicklable(enum_class)
- unpicklable = True
-
-
- # double check that repr and friends are not the mixin's or various
- # things break (such as pickle)
- for name in ('__repr__', '__str__', '__format__', '__reduce_ex__'):
- class_method = getattr(enum_class, name)
- obj_method = getattr(member_type, name, None)
- enum_method = getattr(first_enum, name, None)
- if name not in classdict and class_method is not enum_method:
- if name == '__reduce_ex__' and unpicklable:
- continue
- setattr(enum_class, name, enum_method)
-
- # method resolution and int's are not playing nice
- # Python's less than 2.6 use __cmp__
-
- if pyver < 2.6:
-
- if issubclass(enum_class, int):
- setattr(enum_class, '__cmp__', getattr(int, '__cmp__'))
-
- elif pyver < 3.0:
-
- if issubclass(enum_class, int):
- for method in (
- '__le__',
- '__lt__',
- '__gt__',
- '__ge__',
- '__eq__',
- '__ne__',
- '__hash__',
- ):
- setattr(enum_class, method, getattr(int, method))
-
- # replace any other __new__ with our own (as long as Enum is not None,
- # anyway) -- again, this is to support pickle
- if Enum is not None:
- # if the user defined their own __new__, save it before it gets
- # clobbered in case they subclass later
- if save_new:
- setattr(enum_class, '__member_new__', enum_class.__dict__['__new__'])
- setattr(enum_class, '__new__', Enum.__dict__['__new__'])
- return enum_class
-
- def __bool__(cls):
- """
- classes/types should always be True.
- """
- return True
-
- def __call__(cls, value, names=None, module=None, type=None, start=1):
- """Either returns an existing member, or creates a new enum class.
-
- This method is used both when an enum class is given a value to match
- to an enumeration member (i.e. Color(3)) and for the functional API
- (i.e. Color = Enum('Color', names='red green blue')).
-
- When used for the functional API: `module`, if set, will be stored in
- the new class' __module__ attribute; `type`, if set, will be mixed in
- as the first base class.
-
- Note: if `module` is not set this routine will attempt to discover the
- calling module by walking the frame stack; if this is unsuccessful
- the resulting class will not be pickleable.
-
- """
- if names is None: # simple value lookup
- return cls.__new__(cls, value)
- # otherwise, functional API: we're creating a new Enum type
- return cls._create_(value, names, module=module, type=type, start=start)
-
- def __contains__(cls, member):
- return isinstance(member, cls) and member.name in cls._member_map_
-
- def __delattr__(cls, attr):
- # nicer error message when someone tries to delete an attribute
- # (see issue19025).
- if attr in cls._member_map_:
- raise AttributeError(
- "%s: cannot delete Enum member." % cls.__name__)
- super(EnumMeta, cls).__delattr__(attr)
-
- def __dir__(self):
- return (['__class__', '__doc__', '__members__', '__module__'] +
- self._member_names_)
-
- @property
- def __members__(cls):
- """Returns a mapping of member name->value.
-
- This mapping lists all enum members, including aliases. Note that this
- is a copy of the internal mapping.
-
- """
- return cls._member_map_.copy()
-
- def __getattr__(cls, name):
- """Return the enum member matching `name`
-
- We use __getattr__ instead of descriptors or inserting into the enum
- class' __dict__ in order to support `name` and `value` being both
- properties for enum members (which live in the class' __dict__) and
- enum members themselves.
-
- """
- if _is_dunder(name):
- raise AttributeError(name)
- try:
- return cls._member_map_[name]
- except KeyError:
- raise AttributeError(name)
-
- def __getitem__(cls, name):
- return cls._member_map_[name]
-
- def __iter__(cls):
- return (cls._member_map_[name] for name in cls._member_names_)
-
- def __reversed__(cls):
- return (cls._member_map_[name] for name in reversed(cls._member_names_))
-
- def __len__(cls):
- return len(cls._member_names_)
-
- __nonzero__ = __bool__
-
- def __repr__(cls):
- return "<enum %r>" % cls.__name__
-
- def __setattr__(cls, name, value):
- """Block attempts to reassign Enum members.
-
- A simple assignment to the class namespace only changes one of the
- several possible ways to get an Enum member from the Enum class,
- resulting in an inconsistent Enumeration.
-
- """
- member_map = cls.__dict__.get('_member_map_', {})
- if name in member_map:
- raise AttributeError('Cannot reassign members.')
- super(EnumMeta, cls).__setattr__(name, value)
-
- def _create_(cls, class_name, names=None, module=None, type=None, start=1):
- """Convenience method to create a new Enum class.
-
- `names` can be:
-
- * A string containing member names, separated either with spaces or
- commas. Values are auto-numbered from 1.
- * An iterable of member names. Values are auto-numbered from 1.
- * An iterable of (member name, value) pairs.
- * A mapping of member name -> value.
-
- """
- if pyver < 3.0:
- # if class_name is unicode, attempt a conversion to ASCII
- if isinstance(class_name, unicode):
- try:
- class_name = class_name.encode('ascii')
- except UnicodeEncodeError:
- raise TypeError('%r is not representable in ASCII' % class_name)
- metacls = cls.__class__
- if type is None:
- bases = (cls, )
- else:
- bases = (type, cls)
- classdict = metacls.__prepare__(class_name, bases)
- _order_ = []
-
- # special processing needed for names?
- if isinstance(names, basestring):
- names = names.replace(',', ' ').split()
- if isinstance(names, (tuple, list)) and isinstance(names[0], basestring):
- names = [(e, i+start) for (i, e) in enumerate(names)]
-
- # Here, names is either an iterable of (name, value) or a mapping.
- item = None # in case names is empty
- for item in names:
- if isinstance(item, basestring):
- member_name, member_value = item, names[item]
- else:
- member_name, member_value = item
- classdict[member_name] = member_value
- _order_.append(member_name)
- # only set _order_ in classdict if name/value was not from a mapping
- if not isinstance(item, basestring):
- classdict['_order_'] = _order_
- enum_class = metacls.__new__(metacls, class_name, bases, classdict)
-
- # TODO: replace the frame hack if a blessed way to know the calling
- # module is ever developed
- if module is None:
- try:
- module = _sys._getframe(2).f_globals['__name__']
- except (AttributeError, ValueError):
- pass
- if module is None:
- _make_class_unpicklable(enum_class)
- else:
- enum_class.__module__ = module
-
- return enum_class
-
- @staticmethod
- def _get_mixins_(bases):
- """Returns the type for creating enum members, and the first inherited
- enum class.
-
- bases: the tuple of bases that was given to __new__
-
- """
- if not bases or Enum is None:
- return object, Enum
-
-
- # double check that we are not subclassing a class with existing
- # enumeration members; while we're at it, see if any other data
- # type has been mixed in so we can use the correct __new__
- member_type = first_enum = None
- for base in bases:
- if (base is not Enum and
- issubclass(base, Enum) and
- base._member_names_):
- raise TypeError("Cannot extend enumerations")
- # base is now the last base in bases
- if not issubclass(base, Enum):
- raise TypeError("new enumerations must be created as "
- "`ClassName([mixin_type,] enum_type)`")
-
- # get correct mix-in type (either mix-in type of Enum subclass, or
- # first base if last base is Enum)
- if not issubclass(bases[0], Enum):
- member_type = bases[0] # first data type
- first_enum = bases[-1] # enum type
- else:
- for base in bases[0].__mro__:
- # most common: (IntEnum, int, Enum, object)
- # possible: (<Enum 'AutoIntEnum'>, <Enum 'IntEnum'>,
- # <class 'int'>, <Enum 'Enum'>,
- # <class 'object'>)
- if issubclass(base, Enum):
- if first_enum is None:
- first_enum = base
- else:
- if member_type is None:
- member_type = base
-
- return member_type, first_enum
-
- if pyver < 3.0:
- @staticmethod
- def _find_new_(classdict, member_type, first_enum):
- """Returns the __new__ to be used for creating the enum members.
-
- classdict: the class dictionary given to __new__
- member_type: the data type whose __new__ will be used by default
- first_enum: enumeration to check for an overriding __new__
-
- """
- # now find the correct __new__, checking to see of one was defined
- # by the user; also check earlier enum classes in case a __new__ was
- # saved as __member_new__
- __new__ = classdict.get('__new__', None)
- if __new__:
- return None, True, True # __new__, save_new, use_args
-
- N__new__ = getattr(None, '__new__')
- O__new__ = getattr(object, '__new__')
- if Enum is None:
- E__new__ = N__new__
- else:
- E__new__ = Enum.__dict__['__new__']
- # check all possibles for __member_new__ before falling back to
- # __new__
- for method in ('__member_new__', '__new__'):
- for possible in (member_type, first_enum):
- try:
- target = possible.__dict__[method]
- except (AttributeError, KeyError):
- target = getattr(possible, method, None)
- if target not in [
- None,
- N__new__,
- O__new__,
- E__new__,
- ]:
- if method == '__member_new__':
- classdict['__new__'] = target
- return None, False, True
- if isinstance(target, staticmethod):
- target = target.__get__(member_type)
- __new__ = target
- break
- if __new__ is not None:
- break
- else:
- __new__ = object.__new__
-
- # if a non-object.__new__ is used then whatever value/tuple was
- # assigned to the enum member name will be passed to __new__ and to the
- # new enum member's __init__
- if __new__ is object.__new__:
- use_args = False
- else:
- use_args = True
-
- return __new__, False, use_args
- else:
- @staticmethod
- def _find_new_(classdict, member_type, first_enum):
- """Returns the __new__ to be used for creating the enum members.
-
- classdict: the class dictionary given to __new__
- member_type: the data type whose __new__ will be used by default
- first_enum: enumeration to check for an overriding __new__
-
- """
- # now find the correct __new__, checking to see of one was defined
- # by the user; also check earlier enum classes in case a __new__ was
- # saved as __member_new__
- __new__ = classdict.get('__new__', None)
-
- # should __new__ be saved as __member_new__ later?
- save_new = __new__ is not None
-
- if __new__ is None:
- # check all possibles for __member_new__ before falling back to
- # __new__
- for method in ('__member_new__', '__new__'):
- for possible in (member_type, first_enum):
- target = getattr(possible, method, None)
- if target not in (
- None,
- None.__new__,
- object.__new__,
- Enum.__new__,
- ):
- __new__ = target
- break
- if __new__ is not None:
- break
- else:
- __new__ = object.__new__
-
- # if a non-object.__new__ is used then whatever value/tuple was
- # assigned to the enum member name will be passed to __new__ and to the
- # new enum member's __init__
- if __new__ is object.__new__:
- use_args = False
- else:
- use_args = True
-
- return __new__, save_new, use_args
-
-
-########################################################
-# In order to support Python 2 and 3 with a single
-# codebase we have to create the Enum methods separately
-# and then use the `type(name, bases, dict)` method to
-# create the class.
-########################################################
-temp_enum_dict = {}
-temp_enum_dict['__doc__'] = "Generic enumeration.\n\n Derive from this class to define new enumerations.\n\n"
-
-def __new__(cls, value):
- # all enum instances are actually created during class construction
- # without calling this method; this method is called by the metaclass'
- # __call__ (i.e. Color(3) ), and by pickle
- if type(value) is cls:
- # For lookups like Color(Color.red)
- value = value.value
- #return value
- # by-value search for a matching enum member
- # see if it's in the reverse mapping (for hashable values)
- try:
- if value in cls._value2member_map_:
- return cls._value2member_map_[value]
- except TypeError:
- # not there, now do long search -- O(n) behavior
- for member in cls._member_map_.values():
- if member.value == value:
- return member
- raise ValueError("%s is not a valid %s" % (value, cls.__name__))
-temp_enum_dict['__new__'] = __new__
-del __new__
-
-def __repr__(self):
- return "<%s.%s: %r>" % (
- self.__class__.__name__, self._name_, self._value_)
-temp_enum_dict['__repr__'] = __repr__
-del __repr__
-
-def __str__(self):
- return "%s.%s" % (self.__class__.__name__, self._name_)
-temp_enum_dict['__str__'] = __str__
-del __str__
-
-if pyver >= 3.0:
- def __dir__(self):
- added_behavior = [
- m
- for cls in self.__class__.mro()
- for m in cls.__dict__
- if m[0] != '_' and m not in self._member_map_
- ]
- return (['__class__', '__doc__', '__module__', ] + added_behavior)
- temp_enum_dict['__dir__'] = __dir__
- del __dir__
-
-def __format__(self, format_spec):
- # mixed-in Enums should use the mixed-in type's __format__, otherwise
- # we can get strange results with the Enum name showing up instead of
- # the value
-
- # pure Enum branch
- if self._member_type_ is object:
- cls = str
- val = str(self)
- # mix-in branch
- else:
- cls = self._member_type_
- val = self.value
- return cls.__format__(val, format_spec)
-temp_enum_dict['__format__'] = __format__
-del __format__
-
-
-####################################
-# Python's less than 2.6 use __cmp__
-
-if pyver < 2.6:
-
- def __cmp__(self, other):
- if type(other) is self.__class__:
- if self is other:
- return 0
- return -1
- return NotImplemented
- raise TypeError("unorderable types: %s() and %s()" % (self.__class__.__name__, other.__class__.__name__))
- temp_enum_dict['__cmp__'] = __cmp__
- del __cmp__
-
-else:
-
- def __le__(self, other):
- raise TypeError("unorderable types: %s() <= %s()" % (self.__class__.__name__, other.__class__.__name__))
- temp_enum_dict['__le__'] = __le__
- del __le__
-
- def __lt__(self, other):
- raise TypeError("unorderable types: %s() < %s()" % (self.__class__.__name__, other.__class__.__name__))
- temp_enum_dict['__lt__'] = __lt__
- del __lt__
-
- def __ge__(self, other):
- raise TypeError("unorderable types: %s() >= %s()" % (self.__class__.__name__, other.__class__.__name__))
- temp_enum_dict['__ge__'] = __ge__
- del __ge__
-
- def __gt__(self, other):
- raise TypeError("unorderable types: %s() > %s()" % (self.__class__.__name__, other.__class__.__name__))
- temp_enum_dict['__gt__'] = __gt__
- del __gt__
-
-
-def __eq__(self, other):
- if type(other) is self.__class__:
- return self is other
- return NotImplemented
-temp_enum_dict['__eq__'] = __eq__
-del __eq__
-
-def __ne__(self, other):
- if type(other) is self.__class__:
- return self is not other
- return NotImplemented
-temp_enum_dict['__ne__'] = __ne__
-del __ne__
-
-def __hash__(self):
- return hash(self._name_)
-temp_enum_dict['__hash__'] = __hash__
-del __hash__
-
-def __reduce_ex__(self, proto):
- return self.__class__, (self._value_, )
-temp_enum_dict['__reduce_ex__'] = __reduce_ex__
-del __reduce_ex__
-
-# _RouteClassAttributeToGetattr is used to provide access to the `name`
-# and `value` properties of enum members while keeping some measure of
-# protection from modification, while still allowing for an enumeration
-# to have members named `name` and `value`. This works because enumeration
-# members are not set directly on the enum class -- __getattr__ is
-# used to look them up.
-
-@_RouteClassAttributeToGetattr
-def name(self):
- return self._name_
-temp_enum_dict['name'] = name
-del name
-
-@_RouteClassAttributeToGetattr
-def value(self):
- return self._value_
-temp_enum_dict['value'] = value
-del value
-
-@classmethod
-def _convert(cls, name, module, filter, source=None):
- """
- Create a new Enum subclass that replaces a collection of global constants
- """
- # convert all constants from source (or module) that pass filter() to
- # a new Enum called name, and export the enum and its members back to
- # module;
- # also, replace the __reduce_ex__ method so unpickling works in
- # previous Python versions
- module_globals = vars(_sys.modules[module])
- if source:
- source = vars(source)
- else:
- source = module_globals
- members = dict((name, value) for name, value in source.items() if filter(name))
- cls = cls(name, members, module=module)
- cls.__reduce_ex__ = _reduce_ex_by_name
- module_globals.update(cls.__members__)
- module_globals[name] = cls
- return cls
-temp_enum_dict['_convert'] = _convert
-del _convert
-
-Enum = EnumMeta('Enum', (object, ), temp_enum_dict)
-del temp_enum_dict
-
-# Enum has now been created
-###########################
-
-class IntEnum(int, Enum):
- """Enum where members are also (and must be) ints"""
-
-def _reduce_ex_by_name(self, proto):
- return self.name
-
-def unique(enumeration):
- """Class decorator that ensures only unique members exist in an enumeration."""
- duplicates = []
- for name, member in enumeration.__members__.items():
- if name != member.name:
- duplicates.append((name, member.name))
- if duplicates:
- duplicate_names = ', '.join(
- ["%s -> %s" % (alias, name) for (alias, name) in duplicates]
- )
- raise ValueError('duplicate names found in %r: %s' %
- (enumeration, duplicate_names)
- )
- return enumeration
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/doc/enum.rst b/tests/wpt/web-platform-tests/tools/third_party/enum/enum/doc/enum.rst
deleted file mode 100644
index 3afc238210b..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/doc/enum.rst
+++ /dev/null
@@ -1,735 +0,0 @@
-``enum`` --- support for enumerations
-========================================
-
-.. :synopsis: enumerations are sets of symbolic names bound to unique, constant
- values.
-.. :moduleauthor:: Ethan Furman <ethan@stoneleaf.us>
-.. :sectionauthor:: Barry Warsaw <barry@python.org>,
-.. :sectionauthor:: Eli Bendersky <eliben@gmail.com>,
-.. :sectionauthor:: Ethan Furman <ethan@stoneleaf.us>
-
-----------------
-
-An enumeration is a set of symbolic names (members) bound to unique, constant
-values. Within an enumeration, the members can be compared by identity, and
-the enumeration itself can be iterated over.
-
-
-Module Contents
----------------
-
-This module defines two enumeration classes that can be used to define unique
-sets of names and values: ``Enum`` and ``IntEnum``. It also defines
-one decorator, ``unique``.
-
-``Enum``
-
-Base class for creating enumerated constants. See section `Functional API`_
-for an alternate construction syntax.
-
-``IntEnum``
-
-Base class for creating enumerated constants that are also subclasses of ``int``.
-
-``unique``
-
-Enum class decorator that ensures only one name is bound to any one value.
-
-
-Creating an Enum
-----------------
-
-Enumerations are created using the ``class`` syntax, which makes them
-easy to read and write. An alternative creation method is described in
-`Functional API`_. To define an enumeration, subclass ``Enum`` as
-follows::
-
- >>> from enum import Enum
- >>> class Color(Enum):
- ... red = 1
- ... green = 2
- ... blue = 3
-
-Note: Nomenclature
-
- - The class ``Color`` is an *enumeration* (or *enum*)
- - The attributes ``Color.red``, ``Color.green``, etc., are
- *enumeration members* (or *enum members*).
- - The enum members have *names* and *values* (the name of
- ``Color.red`` is ``red``, the value of ``Color.blue`` is
- ``3``, etc.)
-
-Note:
-
- Even though we use the ``class`` syntax to create Enums, Enums
- are not normal Python classes. See `How are Enums different?`_ for
- more details.
-
-Enumeration members have human readable string representations::
-
- >>> print(Color.red)
- Color.red
-
-...while their ``repr`` has more information::
-
- >>> print(repr(Color.red))
- <Color.red: 1>
-
-The *type* of an enumeration member is the enumeration it belongs to::
-
- >>> type(Color.red)
- <enum 'Color'>
- >>> isinstance(Color.green, Color)
- True
- >>>
-
-Enum members also have a property that contains just their item name::
-
- >>> print(Color.red.name)
- red
-
-Enumerations support iteration. In Python 3.x definition order is used; in
-Python 2.x the definition order is not available, but class attribute
-``__order__`` is supported; otherwise, value order is used::
-
- >>> class Shake(Enum):
- ... __order__ = 'vanilla chocolate cookies mint' # only needed in 2.x
- ... vanilla = 7
- ... chocolate = 4
- ... cookies = 9
- ... mint = 3
- ...
- >>> for shake in Shake:
- ... print(shake)
- ...
- Shake.vanilla
- Shake.chocolate
- Shake.cookies
- Shake.mint
-
-The ``__order__`` attribute is always removed, and in 3.x it is also ignored
-(order is definition order); however, in the stdlib version it will be ignored
-but not removed.
-
-Enumeration members are hashable, so they can be used in dictionaries and sets::
-
- >>> apples = {}
- >>> apples[Color.red] = 'red delicious'
- >>> apples[Color.green] = 'granny smith'
- >>> apples == {Color.red: 'red delicious', Color.green: 'granny smith'}
- True
-
-
-Programmatic access to enumeration members and their attributes
----------------------------------------------------------------
-
-Sometimes it's useful to access members in enumerations programmatically (i.e.
-situations where ``Color.red`` won't do because the exact color is not known
-at program-writing time). ``Enum`` allows such access::
-
- >>> Color(1)
- <Color.red: 1>
- >>> Color(3)
- <Color.blue: 3>
-
-If you want to access enum members by *name*, use item access::
-
- >>> Color['red']
- <Color.red: 1>
- >>> Color['green']
- <Color.green: 2>
-
-If have an enum member and need its ``name`` or ``value``::
-
- >>> member = Color.red
- >>> member.name
- 'red'
- >>> member.value
- 1
-
-
-Duplicating enum members and values
------------------------------------
-
-Having two enum members (or any other attribute) with the same name is invalid;
-in Python 3.x this would raise an error, but in Python 2.x the second member
-simply overwrites the first::
-
- >>> # python 2.x
- >>> class Shape(Enum):
- ... square = 2
- ... square = 3
- ...
- >>> Shape.square
- <Shape.square: 3>
-
- >>> # python 3.x
- >>> class Shape(Enum):
- ... square = 2
- ... square = 3
- Traceback (most recent call last):
- ...
- TypeError: Attempted to reuse key: 'square'
-
-However, two enum members are allowed to have the same value. Given two members
-A and B with the same value (and A defined first), B is an alias to A. By-value
-lookup of the value of A and B will return A. By-name lookup of B will also
-return A::
-
- >>> class Shape(Enum):
- ... __order__ = 'square diamond circle alias_for_square' # only needed in 2.x
- ... square = 2
- ... diamond = 1
- ... circle = 3
- ... alias_for_square = 2
- ...
- >>> Shape.square
- <Shape.square: 2>
- >>> Shape.alias_for_square
- <Shape.square: 2>
- >>> Shape(2)
- <Shape.square: 2>
-
-
-Allowing aliases is not always desirable. ``unique`` can be used to ensure
-that none exist in a particular enumeration::
-
- >>> from enum import unique
- >>> @unique
- ... class Mistake(Enum):
- ... __order__ = 'one two three four' # only needed in 2.x
- ... one = 1
- ... two = 2
- ... three = 3
- ... four = 3
- Traceback (most recent call last):
- ...
- ValueError: duplicate names found in <enum 'Mistake'>: four -> three
-
-Iterating over the members of an enum does not provide the aliases::
-
- >>> list(Shape)
- [<Shape.square: 2>, <Shape.diamond: 1>, <Shape.circle: 3>]
-
-The special attribute ``__members__`` is a dictionary mapping names to members.
-It includes all names defined in the enumeration, including the aliases::
-
- >>> for name, member in sorted(Shape.__members__.items()):
- ... name, member
- ...
- ('alias_for_square', <Shape.square: 2>)
- ('circle', <Shape.circle: 3>)
- ('diamond', <Shape.diamond: 1>)
- ('square', <Shape.square: 2>)
-
-The ``__members__`` attribute can be used for detailed programmatic access to
-the enumeration members. For example, finding all the aliases::
-
- >>> [name for name, member in Shape.__members__.items() if member.name != name]
- ['alias_for_square']
-
-Comparisons
------------
-
-Enumeration members are compared by identity::
-
- >>> Color.red is Color.red
- True
- >>> Color.red is Color.blue
- False
- >>> Color.red is not Color.blue
- True
-
-Ordered comparisons between enumeration values are *not* supported. Enum
-members are not integers (but see `IntEnum`_ below)::
-
- >>> Color.red < Color.blue
- Traceback (most recent call last):
- File "<stdin>", line 1, in <module>
- TypeError: unorderable types: Color() < Color()
-
-.. warning::
-
- In Python 2 *everything* is ordered, even though the ordering may not
- make sense. If you want your enumerations to have a sensible ordering
- check out the `OrderedEnum`_ recipe below.
-
-
-Equality comparisons are defined though::
-
- >>> Color.blue == Color.red
- False
- >>> Color.blue != Color.red
- True
- >>> Color.blue == Color.blue
- True
-
-Comparisons against non-enumeration values will always compare not equal
-(again, ``IntEnum`` was explicitly designed to behave differently, see
-below)::
-
- >>> Color.blue == 2
- False
-
-
-Allowed members and attributes of enumerations
-----------------------------------------------
-
-The examples above use integers for enumeration values. Using integers is
-short and handy (and provided by default by the `Functional API`_), but not
-strictly enforced. In the vast majority of use-cases, one doesn't care what
-the actual value of an enumeration is. But if the value *is* important,
-enumerations can have arbitrary values.
-
-Enumerations are Python classes, and can have methods and special methods as
-usual. If we have this enumeration::
-
- >>> class Mood(Enum):
- ... funky = 1
- ... happy = 3
- ...
- ... def describe(self):
- ... # self is the member here
- ... return self.name, self.value
- ...
- ... def __str__(self):
- ... return 'my custom str! {0}'.format(self.value)
- ...
- ... @classmethod
- ... def favorite_mood(cls):
- ... # cls here is the enumeration
- ... return cls.happy
-
-Then::
-
- >>> Mood.favorite_mood()
- <Mood.happy: 3>
- >>> Mood.happy.describe()
- ('happy', 3)
- >>> str(Mood.funky)
- 'my custom str! 1'
-
-The rules for what is allowed are as follows: _sunder_ names (starting and
-ending with a single underscore) are reserved by enum and cannot be used;
-all other attributes defined within an enumeration will become members of this
-enumeration, with the exception of *__dunder__* names and descriptors (methods
-are also descriptors).
-
-Note:
-
- If your enumeration defines ``__new__`` and/or ``__init__`` then
- whatever value(s) were given to the enum member will be passed into
- those methods. See `Planet`_ for an example.
-
-
-Restricted subclassing of enumerations
---------------------------------------
-
-Subclassing an enumeration is allowed only if the enumeration does not define
-any members. So this is forbidden::
-
- >>> class MoreColor(Color):
- ... pink = 17
- Traceback (most recent call last):
- ...
- TypeError: Cannot extend enumerations
-
-But this is allowed::
-
- >>> class Foo(Enum):
- ... def some_behavior(self):
- ... pass
- ...
- >>> class Bar(Foo):
- ... happy = 1
- ... sad = 2
- ...
-
-Allowing subclassing of enums that define members would lead to a violation of
-some important invariants of types and instances. On the other hand, it makes
-sense to allow sharing some common behavior between a group of enumerations.
-(See `OrderedEnum`_ for an example.)
-
-
-Pickling
---------
-
-Enumerations can be pickled and unpickled::
-
- >>> from enum.test_enum import Fruit
- >>> from pickle import dumps, loads
- >>> Fruit.tomato is loads(dumps(Fruit.tomato, 2))
- True
-
-The usual restrictions for pickling apply: picklable enums must be defined in
-the top level of a module, since unpickling requires them to be importable
-from that module.
-
-Note:
-
- With pickle protocol version 4 (introduced in Python 3.4) it is possible
- to easily pickle enums nested in other classes.
-
-
-
-Functional API
---------------
-
-The ``Enum`` class is callable, providing the following functional API::
-
- >>> Animal = Enum('Animal', 'ant bee cat dog')
- >>> Animal
- <enum 'Animal'>
- >>> Animal.ant
- <Animal.ant: 1>
- >>> Animal.ant.value
- 1
- >>> list(Animal)
- [<Animal.ant: 1>, <Animal.bee: 2>, <Animal.cat: 3>, <Animal.dog: 4>]
-
-The semantics of this API resemble ``namedtuple``. The first argument
-of the call to ``Enum`` is the name of the enumeration.
-
-The second argument is the *source* of enumeration member names. It can be a
-whitespace-separated string of names, a sequence of names, a sequence of
-2-tuples with key/value pairs, or a mapping (e.g. dictionary) of names to
-values. The last two options enable assigning arbitrary values to
-enumerations; the others auto-assign increasing integers starting with 1. A
-new class derived from ``Enum`` is returned. In other words, the above
-assignment to ``Animal`` is equivalent to::
-
- >>> class Animals(Enum):
- ... ant = 1
- ... bee = 2
- ... cat = 3
- ... dog = 4
-
-Pickling enums created with the functional API can be tricky as frame stack
-implementation details are used to try and figure out which module the
-enumeration is being created in (e.g. it will fail if you use a utility
-function in separate module, and also may not work on IronPython or Jython).
-The solution is to specify the module name explicitly as follows::
-
- >>> Animals = Enum('Animals', 'ant bee cat dog', module=__name__)
-
-Derived Enumerations
---------------------
-
-IntEnum
-^^^^^^^
-
-A variation of ``Enum`` is provided which is also a subclass of
-``int``. Members of an ``IntEnum`` can be compared to integers;
-by extension, integer enumerations of different types can also be compared
-to each other::
-
- >>> from enum import IntEnum
- >>> class Shape(IntEnum):
- ... circle = 1
- ... square = 2
- ...
- >>> class Request(IntEnum):
- ... post = 1
- ... get = 2
- ...
- >>> Shape == 1
- False
- >>> Shape.circle == 1
- True
- >>> Shape.circle == Request.post
- True
-
-However, they still can't be compared to standard ``Enum`` enumerations::
-
- >>> class Shape(IntEnum):
- ... circle = 1
- ... square = 2
- ...
- >>> class Color(Enum):
- ... red = 1
- ... green = 2
- ...
- >>> Shape.circle == Color.red
- False
-
-``IntEnum`` values behave like integers in other ways you'd expect::
-
- >>> int(Shape.circle)
- 1
- >>> ['a', 'b', 'c'][Shape.circle]
- 'b'
- >>> [i for i in range(Shape.square)]
- [0, 1]
-
-For the vast majority of code, ``Enum`` is strongly recommended,
-since ``IntEnum`` breaks some semantic promises of an enumeration (by
-being comparable to integers, and thus by transitivity to other
-unrelated enumerations). It should be used only in special cases where
-there's no other choice; for example, when integer constants are
-replaced with enumerations and backwards compatibility is required with code
-that still expects integers.
-
-
-Others
-^^^^^^
-
-While ``IntEnum`` is part of the ``enum`` module, it would be very
-simple to implement independently::
-
- class IntEnum(int, Enum):
- pass
-
-This demonstrates how similar derived enumerations can be defined; for example
-a ``StrEnum`` that mixes in ``str`` instead of ``int``.
-
-Some rules:
-
-1. When subclassing ``Enum``, mix-in types must appear before
- ``Enum`` itself in the sequence of bases, as in the ``IntEnum``
- example above.
-2. While ``Enum`` can have members of any type, once you mix in an
- additional type, all the members must have values of that type, e.g.
- ``int`` above. This restriction does not apply to mix-ins which only
- add methods and don't specify another data type such as ``int`` or
- ``str``.
-3. When another data type is mixed in, the ``value`` attribute is *not the
- same* as the enum member itself, although it is equivalant and will compare
- equal.
-4. %-style formatting: ``%s`` and ``%r`` call ``Enum``'s ``__str__`` and
- ``__repr__`` respectively; other codes (such as ``%i`` or ``%h`` for
- IntEnum) treat the enum member as its mixed-in type.
-
- Note: Prior to Python 3.4 there is a bug in ``str``'s %-formatting: ``int``
- subclasses are printed as strings and not numbers when the ``%d``, ``%i``,
- or ``%u`` codes are used.
-5. ``str.__format__`` (or ``format``) will use the mixed-in
- type's ``__format__``. If the ``Enum``'s ``str`` or
- ``repr`` is desired use the ``!s`` or ``!r`` ``str`` format codes.
-
-
-Decorators
-----------
-
-unique
-^^^^^^
-
-A ``class`` decorator specifically for enumerations. It searches an
-enumeration's ``__members__`` gathering any aliases it finds; if any are
-found ``ValueError`` is raised with the details::
-
- >>> @unique
- ... class NoDupes(Enum):
- ... first = 'one'
- ... second = 'two'
- ... third = 'two'
- Traceback (most recent call last):
- ...
- ValueError: duplicate names found in <enum 'NoDupes'>: third -> second
-
-
-Interesting examples
---------------------
-
-While ``Enum`` and ``IntEnum`` are expected to cover the majority of
-use-cases, they cannot cover them all. Here are recipes for some different
-types of enumerations that can be used directly, or as examples for creating
-one's own.
-
-
-AutoNumber
-^^^^^^^^^^
-
-Avoids having to specify the value for each enumeration member::
-
- >>> class AutoNumber(Enum):
- ... def __new__(cls):
- ... value = len(cls.__members__) + 1
- ... obj = object.__new__(cls)
- ... obj._value_ = value
- ... return obj
- ...
- >>> class Color(AutoNumber):
- ... __order__ = "red green blue" # only needed in 2.x
- ... red = ()
- ... green = ()
- ... blue = ()
- ...
- >>> Color.green.value == 2
- True
-
-Note:
-
- The `__new__` method, if defined, is used during creation of the Enum
- members; it is then replaced by Enum's `__new__` which is used after
- class creation for lookup of existing members. Due to the way Enums are
- supposed to behave, there is no way to customize Enum's `__new__`.
-
-
-UniqueEnum
-^^^^^^^^^^
-
-Raises an error if a duplicate member name is found instead of creating an
-alias::
-
- >>> class UniqueEnum(Enum):
- ... def __init__(self, *args):
- ... cls = self.__class__
- ... if any(self.value == e.value for e in cls):
- ... a = self.name
- ... e = cls(self.value).name
- ... raise ValueError(
- ... "aliases not allowed in UniqueEnum: %r --> %r"
- ... % (a, e))
- ...
- >>> class Color(UniqueEnum):
- ... red = 1
- ... green = 2
- ... blue = 3
- ... grene = 2
- Traceback (most recent call last):
- ...
- ValueError: aliases not allowed in UniqueEnum: 'grene' --> 'green'
-
-
-OrderedEnum
-^^^^^^^^^^^
-
-An ordered enumeration that is not based on ``IntEnum`` and so maintains
-the normal ``Enum`` invariants (such as not being comparable to other
-enumerations)::
-
- >>> class OrderedEnum(Enum):
- ... def __ge__(self, other):
- ... if self.__class__ is other.__class__:
- ... return self._value_ >= other._value_
- ... return NotImplemented
- ... def __gt__(self, other):
- ... if self.__class__ is other.__class__:
- ... return self._value_ > other._value_
- ... return NotImplemented
- ... def __le__(self, other):
- ... if self.__class__ is other.__class__:
- ... return self._value_ <= other._value_
- ... return NotImplemented
- ... def __lt__(self, other):
- ... if self.__class__ is other.__class__:
- ... return self._value_ < other._value_
- ... return NotImplemented
- ...
- >>> class Grade(OrderedEnum):
- ... __ordered__ = 'A B C D F'
- ... A = 5
- ... B = 4
- ... C = 3
- ... D = 2
- ... F = 1
- ...
- >>> Grade.C < Grade.A
- True
-
-
-Planet
-^^^^^^
-
-If ``__new__`` or ``__init__`` is defined the value of the enum member
-will be passed to those methods::
-
- >>> class Planet(Enum):
- ... MERCURY = (3.303e+23, 2.4397e6)
- ... VENUS = (4.869e+24, 6.0518e6)
- ... EARTH = (5.976e+24, 6.37814e6)
- ... MARS = (6.421e+23, 3.3972e6)
- ... JUPITER = (1.9e+27, 7.1492e7)
- ... SATURN = (5.688e+26, 6.0268e7)
- ... URANUS = (8.686e+25, 2.5559e7)
- ... NEPTUNE = (1.024e+26, 2.4746e7)
- ... def __init__(self, mass, radius):
- ... self.mass = mass # in kilograms
- ... self.radius = radius # in meters
- ... @property
- ... def surface_gravity(self):
- ... # universal gravitational constant (m3 kg-1 s-2)
- ... G = 6.67300E-11
- ... return G * self.mass / (self.radius * self.radius)
- ...
- >>> Planet.EARTH.value
- (5.976e+24, 6378140.0)
- >>> Planet.EARTH.surface_gravity
- 9.802652743337129
-
-
-How are Enums different?
-------------------------
-
-Enums have a custom metaclass that affects many aspects of both derived Enum
-classes and their instances (members).
-
-
-Enum Classes
-^^^^^^^^^^^^
-
-The ``EnumMeta`` metaclass is responsible for providing the
-``__contains__``, ``__dir__``, ``__iter__`` and other methods that
-allow one to do things with an ``Enum`` class that fail on a typical
-class, such as ``list(Color)`` or ``some_var in Color``. ``EnumMeta`` is
-responsible for ensuring that various other methods on the final ``Enum``
-class are correct (such as ``__new__``, ``__getnewargs__``,
-``__str__`` and ``__repr__``).
-
-.. note::
-
- ``__dir__`` is not changed in the Python 2 line as it messes up some
- of the decorators included in the stdlib.
-
-
-Enum Members (aka instances)
-^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-
-The most interesting thing about Enum members is that they are singletons.
-``EnumMeta`` creates them all while it is creating the ``Enum``
-class itself, and then puts a custom ``__new__`` in place to ensure
-that no new ones are ever instantiated by returning only the existing
-member instances.
-
-
-Finer Points
-^^^^^^^^^^^^
-
-``Enum`` members are instances of an ``Enum`` class, and even though they
-are accessible as `EnumClass.member1.member2`, they should not be
-accessed directly from the member as that lookup may fail or, worse,
-return something besides the ``Enum`` member you were looking for
-(changed in version 1.1.1)::
-
- >>> class FieldTypes(Enum):
- ... name = 1
- ... value = 2
- ... size = 3
- ...
- >>> FieldTypes.value.size
- <FieldTypes.size: 3>
- >>> FieldTypes.size.value
- 3
-
-The ``__members__`` attribute is only available on the class.
-
-In Python 3.x ``__members__`` is always an ``OrderedDict``, with the order being
-the definition order. In Python 2.7 ``__members__`` is an ``OrderedDict`` if
-``__order__`` was specified, and a plain ``dict`` otherwise. In all other Python
-2.x versions ``__members__`` is a plain ``dict`` even if ``__order__`` was specified
-as the ``OrderedDict`` type didn't exist yet.
-
-If you give your ``Enum`` subclass extra methods, like the `Planet`_
-class above, those methods will show up in a `dir` of the member,
-but not of the class::
-
- >>> dir(Planet)
- ['EARTH', 'JUPITER', 'MARS', 'MERCURY', 'NEPTUNE', 'SATURN', 'URANUS',
- 'VENUS', '__class__', '__doc__', '__members__', '__module__']
- >>> dir(Planet.EARTH)
- ['__class__', '__doc__', '__module__', 'name', 'surface_gravity', 'value']
-
-A ``__new__`` method will only be used for the creation of the
-``Enum`` members -- after that it is replaced. This means if you wish to
-change how ``Enum`` members are looked up you either have to write a
-helper function or a ``classmethod``.
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/test.py b/tests/wpt/web-platform-tests/tools/third_party/enum/enum/test.py
deleted file mode 100644
index c8c4b962242..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum/test.py
+++ /dev/null
@@ -1,1841 +0,0 @@
-from pickle import dumps, loads, PicklingError, HIGHEST_PROTOCOL
-import sys
-import unittest
-pyver = float('%s.%s' % sys.version_info[:2])
-if pyver < 2.5:
- sys.path.insert(0, '.')
-import enum
-from enum import Enum, IntEnum, unique, EnumMeta
-
-if pyver < 2.6:
- from __builtin__ import enumerate as bltin_enumerate
- def enumerate(thing, start=0):
- result = []
- for i, item in bltin_enumerate(thing):
- i = i + start
- result.append((i, item))
- return result
-
-try:
- any
-except NameError:
- def any(iterable):
- for element in iterable:
- if element:
- return True
- return False
-
-try:
- unicode
-except NameError:
- unicode = str
-
-try:
- from collections import OrderedDict
-except ImportError:
- OrderedDict = None
-
-# for pickle tests
-try:
- class Stooges(Enum):
- LARRY = 1
- CURLY = 2
- MOE = 3
-except Exception:
- Stooges = sys.exc_info()[1]
-
-try:
- class IntStooges(int, Enum):
- LARRY = 1
- CURLY = 2
- MOE = 3
-except Exception:
- IntStooges = sys.exc_info()[1]
-
-try:
- class FloatStooges(float, Enum):
- LARRY = 1.39
- CURLY = 2.72
- MOE = 3.142596
-except Exception:
- FloatStooges = sys.exc_info()[1]
-
-# for pickle test and subclass tests
-try:
- class StrEnum(str, Enum):
- 'accepts only string values'
- class Name(StrEnum):
- BDFL = 'Guido van Rossum'
- FLUFL = 'Barry Warsaw'
-except Exception:
- Name = sys.exc_info()[1]
-
-try:
- Question = Enum('Question', 'who what when where why', module=__name__)
-except Exception:
- Question = sys.exc_info()[1]
-
-try:
- Answer = Enum('Answer', 'him this then there because')
-except Exception:
- Answer = sys.exc_info()[1]
-
-try:
- Theory = Enum('Theory', 'rule law supposition', qualname='spanish_inquisition')
-except Exception:
- Theory = sys.exc_info()[1]
-
-# for doctests
-try:
- class Fruit(Enum):
- tomato = 1
- banana = 2
- cherry = 3
-except Exception:
- pass
-
-def test_pickle_dump_load(assertion, source, target=None,
- protocol=(0, HIGHEST_PROTOCOL)):
- start, stop = protocol
- failures = []
- for protocol in range(start, stop+1):
- try:
- if target is None:
- assertion(loads(dumps(source, protocol=protocol)) is source)
- else:
- assertion(loads(dumps(source, protocol=protocol)), target)
- except Exception:
- exc, tb = sys.exc_info()[1:]
- failures.append('%2d: %s' %(protocol, exc))
- if failures:
- raise ValueError('Failed with protocols: %s' % ', '.join(failures))
-
-def test_pickle_exception(assertion, exception, obj,
- protocol=(0, HIGHEST_PROTOCOL)):
- start, stop = protocol
- failures = []
- for protocol in range(start, stop+1):
- try:
- assertion(exception, dumps, obj, protocol=protocol)
- except Exception:
- exc = sys.exc_info()[1]
- failures.append('%d: %s %s' % (protocol, exc.__class__.__name__, exc))
- if failures:
- raise ValueError('Failed with protocols: %s' % ', '.join(failures))
-
-
-class TestHelpers(unittest.TestCase):
- # _is_descriptor, _is_sunder, _is_dunder
-
- def test_is_descriptor(self):
- class foo:
- pass
- for attr in ('__get__','__set__','__delete__'):
- obj = foo()
- self.assertFalse(enum._is_descriptor(obj))
- setattr(obj, attr, 1)
- self.assertTrue(enum._is_descriptor(obj))
-
- def test_is_sunder(self):
- for s in ('_a_', '_aa_'):
- self.assertTrue(enum._is_sunder(s))
-
- for s in ('a', 'a_', '_a', '__a', 'a__', '__a__', '_a__', '__a_', '_',
- '__', '___', '____', '_____',):
- self.assertFalse(enum._is_sunder(s))
-
- def test_is_dunder(self):
- for s in ('__a__', '__aa__'):
- self.assertTrue(enum._is_dunder(s))
- for s in ('a', 'a_', '_a', '__a', 'a__', '_a_', '_a__', '__a_', '_',
- '__', '___', '____', '_____',):
- self.assertFalse(enum._is_dunder(s))
-
-
-class TestEnum(unittest.TestCase):
- def setUp(self):
- class Season(Enum):
- SPRING = 1
- SUMMER = 2
- AUTUMN = 3
- WINTER = 4
- self.Season = Season
-
- class Konstants(float, Enum):
- E = 2.7182818
- PI = 3.1415926
- TAU = 2 * PI
- self.Konstants = Konstants
-
- class Grades(IntEnum):
- A = 5
- B = 4
- C = 3
- D = 2
- F = 0
- self.Grades = Grades
-
- class Directional(str, Enum):
- EAST = 'east'
- WEST = 'west'
- NORTH = 'north'
- SOUTH = 'south'
- self.Directional = Directional
-
- from datetime import date
- class Holiday(date, Enum):
- NEW_YEAR = 2013, 1, 1
- IDES_OF_MARCH = 2013, 3, 15
- self.Holiday = Holiday
-
- if pyver >= 3.0: # do not specify custom `dir` on previous versions
- def test_dir_on_class(self):
- Season = self.Season
- self.assertEqual(
- set(dir(Season)),
- set(['__class__', '__doc__', '__members__', '__module__',
- 'SPRING', 'SUMMER', 'AUTUMN', 'WINTER']),
- )
-
- def test_dir_on_item(self):
- Season = self.Season
- self.assertEqual(
- set(dir(Season.WINTER)),
- set(['__class__', '__doc__', '__module__', 'name', 'value']),
- )
-
- def test_dir_with_added_behavior(self):
- class Test(Enum):
- this = 'that'
- these = 'those'
- def wowser(self):
- return ("Wowser! I'm %s!" % self.name)
- self.assertEqual(
- set(dir(Test)),
- set(['__class__', '__doc__', '__members__', '__module__', 'this', 'these']),
- )
- self.assertEqual(
- set(dir(Test.this)),
- set(['__class__', '__doc__', '__module__', 'name', 'value', 'wowser']),
- )
-
- def test_dir_on_sub_with_behavior_on_super(self):
- # see issue22506
- class SuperEnum(Enum):
- def invisible(self):
- return "did you see me?"
- class SubEnum(SuperEnum):
- sample = 5
- self.assertEqual(
- set(dir(SubEnum.sample)),
- set(['__class__', '__doc__', '__module__', 'name', 'value', 'invisible']),
- )
-
- if pyver >= 2.7: # OrderedDict first available here
- def test_members_is_ordereddict_if_ordered(self):
- class Ordered(Enum):
- __order__ = 'first second third'
- first = 'bippity'
- second = 'boppity'
- third = 'boo'
- self.assertTrue(type(Ordered.__members__) is OrderedDict)
-
- def test_members_is_ordereddict_if_not_ordered(self):
- class Unordered(Enum):
- this = 'that'
- these = 'those'
- self.assertTrue(type(Unordered.__members__) is OrderedDict)
-
- if pyver >= 3.0: # all objects are ordered in Python 2.x
- def test_members_is_always_ordered(self):
- class AlwaysOrdered(Enum):
- first = 1
- second = 2
- third = 3
- self.assertTrue(type(AlwaysOrdered.__members__) is OrderedDict)
-
- def test_comparisons(self):
- def bad_compare():
- Season.SPRING > 4
- Season = self.Season
- self.assertNotEqual(Season.SPRING, 1)
- self.assertRaises(TypeError, bad_compare)
-
- class Part(Enum):
- SPRING = 1
- CLIP = 2
- BARREL = 3
-
- self.assertNotEqual(Season.SPRING, Part.SPRING)
- def bad_compare():
- Season.SPRING < Part.CLIP
- self.assertRaises(TypeError, bad_compare)
-
- def test_enum_in_enum_out(self):
- Season = self.Season
- self.assertTrue(Season(Season.WINTER) is Season.WINTER)
-
- def test_enum_value(self):
- Season = self.Season
- self.assertEqual(Season.SPRING.value, 1)
-
- def test_intenum_value(self):
- self.assertEqual(IntStooges.CURLY.value, 2)
-
- def test_enum(self):
- Season = self.Season
- lst = list(Season)
- self.assertEqual(len(lst), len(Season))
- self.assertEqual(len(Season), 4, Season)
- self.assertEqual(
- [Season.SPRING, Season.SUMMER, Season.AUTUMN, Season.WINTER], lst)
-
- for i, season in enumerate('SPRING SUMMER AUTUMN WINTER'.split()):
- i += 1
- e = Season(i)
- self.assertEqual(e, getattr(Season, season))
- self.assertEqual(e.value, i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, season)
- self.assertTrue(e in Season)
- self.assertTrue(type(e) is Season)
- self.assertTrue(isinstance(e, Season))
- self.assertEqual(str(e), 'Season.' + season)
- self.assertEqual(
- repr(e),
- '<Season.%s: %s>' % (season, i),
- )
-
- def test_value_name(self):
- Season = self.Season
- self.assertEqual(Season.SPRING.name, 'SPRING')
- self.assertEqual(Season.SPRING.value, 1)
- def set_name(obj, new_value):
- obj.name = new_value
- def set_value(obj, new_value):
- obj.value = new_value
- self.assertRaises(AttributeError, set_name, Season.SPRING, 'invierno', )
- self.assertRaises(AttributeError, set_value, Season.SPRING, 2)
-
- def test_attribute_deletion(self):
- class Season(Enum):
- SPRING = 1
- SUMMER = 2
- AUTUMN = 3
- WINTER = 4
-
- def spam(cls):
- pass
-
- self.assertTrue(hasattr(Season, 'spam'))
- del Season.spam
- self.assertFalse(hasattr(Season, 'spam'))
-
- self.assertRaises(AttributeError, delattr, Season, 'SPRING')
- self.assertRaises(AttributeError, delattr, Season, 'DRY')
- self.assertRaises(AttributeError, delattr, Season.SPRING, 'name')
-
- def test_bool_of_class(self):
- class Empty(Enum):
- pass
- self.assertTrue(bool(Empty))
-
- def test_bool_of_member(self):
- class Count(Enum):
- zero = 0
- one = 1
- two = 2
- for member in Count:
- self.assertTrue(bool(member))
-
- def test_invalid_names(self):
- def create_bad_class_1():
- class Wrong(Enum):
- mro = 9
- def create_bad_class_2():
- class Wrong(Enum):
- _reserved_ = 3
- self.assertRaises(ValueError, create_bad_class_1)
- self.assertRaises(ValueError, create_bad_class_2)
-
- def test_contains(self):
- Season = self.Season
- self.assertTrue(Season.AUTUMN in Season)
- self.assertTrue(3 not in Season)
-
- val = Season(3)
- self.assertTrue(val in Season)
-
- class OtherEnum(Enum):
- one = 1; two = 2
- self.assertTrue(OtherEnum.two not in Season)
-
- if pyver >= 2.6: # when `format` came into being
-
- def test_format_enum(self):
- Season = self.Season
- self.assertEqual('{0}'.format(Season.SPRING),
- '{0}'.format(str(Season.SPRING)))
- self.assertEqual( '{0:}'.format(Season.SPRING),
- '{0:}'.format(str(Season.SPRING)))
- self.assertEqual('{0:20}'.format(Season.SPRING),
- '{0:20}'.format(str(Season.SPRING)))
- self.assertEqual('{0:^20}'.format(Season.SPRING),
- '{0:^20}'.format(str(Season.SPRING)))
- self.assertEqual('{0:>20}'.format(Season.SPRING),
- '{0:>20}'.format(str(Season.SPRING)))
- self.assertEqual('{0:<20}'.format(Season.SPRING),
- '{0:<20}'.format(str(Season.SPRING)))
-
- def test_format_enum_custom(self):
- class TestFloat(float, Enum):
- one = 1.0
- two = 2.0
- def __format__(self, spec):
- return 'TestFloat success!'
- self.assertEqual('{0}'.format(TestFloat.one), 'TestFloat success!')
-
- def assertFormatIsValue(self, spec, member):
- self.assertEqual(spec.format(member), spec.format(member.value))
-
- def test_format_enum_date(self):
- Holiday = self.Holiday
- self.assertFormatIsValue('{0}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:20}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:^20}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:>20}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:<20}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:%Y %m}', Holiday.IDES_OF_MARCH)
- self.assertFormatIsValue('{0:%Y %m %M:00}', Holiday.IDES_OF_MARCH)
-
- def test_format_enum_float(self):
- Konstants = self.Konstants
- self.assertFormatIsValue('{0}', Konstants.TAU)
- self.assertFormatIsValue('{0:}', Konstants.TAU)
- self.assertFormatIsValue('{0:20}', Konstants.TAU)
- self.assertFormatIsValue('{0:^20}', Konstants.TAU)
- self.assertFormatIsValue('{0:>20}', Konstants.TAU)
- self.assertFormatIsValue('{0:<20}', Konstants.TAU)
- self.assertFormatIsValue('{0:n}', Konstants.TAU)
- self.assertFormatIsValue('{0:5.2}', Konstants.TAU)
- self.assertFormatIsValue('{0:f}', Konstants.TAU)
-
- def test_format_enum_int(self):
- Grades = self.Grades
- self.assertFormatIsValue('{0}', Grades.C)
- self.assertFormatIsValue('{0:}', Grades.C)
- self.assertFormatIsValue('{0:20}', Grades.C)
- self.assertFormatIsValue('{0:^20}', Grades.C)
- self.assertFormatIsValue('{0:>20}', Grades.C)
- self.assertFormatIsValue('{0:<20}', Grades.C)
- self.assertFormatIsValue('{0:+}', Grades.C)
- self.assertFormatIsValue('{0:08X}', Grades.C)
- self.assertFormatIsValue('{0:b}', Grades.C)
-
- def test_format_enum_str(self):
- Directional = self.Directional
- self.assertFormatIsValue('{0}', Directional.WEST)
- self.assertFormatIsValue('{0:}', Directional.WEST)
- self.assertFormatIsValue('{0:20}', Directional.WEST)
- self.assertFormatIsValue('{0:^20}', Directional.WEST)
- self.assertFormatIsValue('{0:>20}', Directional.WEST)
- self.assertFormatIsValue('{0:<20}', Directional.WEST)
-
- def test_hash(self):
- Season = self.Season
- dates = {}
- dates[Season.WINTER] = '1225'
- dates[Season.SPRING] = '0315'
- dates[Season.SUMMER] = '0704'
- dates[Season.AUTUMN] = '1031'
- self.assertEqual(dates[Season.AUTUMN], '1031')
-
- def test_enum_duplicates(self):
- class Season(Enum):
- _order_ = "SPRING SUMMER AUTUMN WINTER"
- SPRING = 1
- SUMMER = 2
- AUTUMN = FALL = 3
- WINTER = 4
- ANOTHER_SPRING = 1
- lst = list(Season)
- self.assertEqual(
- lst,
- [Season.SPRING, Season.SUMMER,
- Season.AUTUMN, Season.WINTER,
- ])
- self.assertTrue(Season.FALL is Season.AUTUMN)
- self.assertEqual(Season.FALL.value, 3)
- self.assertEqual(Season.AUTUMN.value, 3)
- self.assertTrue(Season(3) is Season.AUTUMN)
- self.assertTrue(Season(1) is Season.SPRING)
- self.assertEqual(Season.FALL.name, 'AUTUMN')
- self.assertEqual(
- set([k for k,v in Season.__members__.items() if v.name != k]),
- set(['FALL', 'ANOTHER_SPRING']),
- )
-
- if pyver >= 3.0:
- cls = vars()
- result = {'Enum':Enum}
- exec("""def test_duplicate_name(self):
- with self.assertRaises(TypeError):
- class Color(Enum):
- red = 1
- green = 2
- blue = 3
- red = 4
-
- with self.assertRaises(TypeError):
- class Color(Enum):
- red = 1
- green = 2
- blue = 3
- def red(self):
- return 'red'
-
- with self.assertRaises(TypeError):
- class Color(Enum):
- @property
-
- def red(self):
- return 'redder'
- red = 1
- green = 2
- blue = 3""",
- result)
- cls['test_duplicate_name'] = result['test_duplicate_name']
-
- def test_enum_with_value_name(self):
- class Huh(Enum):
- name = 1
- value = 2
- self.assertEqual(
- list(Huh),
- [Huh.name, Huh.value],
- )
- self.assertTrue(type(Huh.name) is Huh)
- self.assertEqual(Huh.name.name, 'name')
- self.assertEqual(Huh.name.value, 1)
-
- def test_intenum_from_scratch(self):
- class phy(int, Enum):
- pi = 3
- tau = 2 * pi
- self.assertTrue(phy.pi < phy.tau)
-
- def test_intenum_inherited(self):
- class IntEnum(int, Enum):
- pass
- class phy(IntEnum):
- pi = 3
- tau = 2 * pi
- self.assertTrue(phy.pi < phy.tau)
-
- def test_floatenum_from_scratch(self):
- class phy(float, Enum):
- pi = 3.1415926
- tau = 2 * pi
- self.assertTrue(phy.pi < phy.tau)
-
- def test_floatenum_inherited(self):
- class FloatEnum(float, Enum):
- pass
- class phy(FloatEnum):
- pi = 3.1415926
- tau = 2 * pi
- self.assertTrue(phy.pi < phy.tau)
-
- def test_strenum_from_scratch(self):
- class phy(str, Enum):
- pi = 'Pi'
- tau = 'Tau'
- self.assertTrue(phy.pi < phy.tau)
-
- def test_strenum_inherited(self):
- class StrEnum(str, Enum):
- pass
- class phy(StrEnum):
- pi = 'Pi'
- tau = 'Tau'
- self.assertTrue(phy.pi < phy.tau)
-
- def test_intenum(self):
- class WeekDay(IntEnum):
- SUNDAY = 1
- MONDAY = 2
- TUESDAY = 3
- WEDNESDAY = 4
- THURSDAY = 5
- FRIDAY = 6
- SATURDAY = 7
-
- self.assertEqual(['a', 'b', 'c'][WeekDay.MONDAY], 'c')
- self.assertEqual([i for i in range(WeekDay.TUESDAY)], [0, 1, 2])
-
- lst = list(WeekDay)
- self.assertEqual(len(lst), len(WeekDay))
- self.assertEqual(len(WeekDay), 7)
- target = 'SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY'
- target = target.split()
- for i, weekday in enumerate(target):
- i += 1
- e = WeekDay(i)
- self.assertEqual(e, i)
- self.assertEqual(int(e), i)
- self.assertEqual(e.name, weekday)
- self.assertTrue(e in WeekDay)
- self.assertEqual(lst.index(e)+1, i)
- self.assertTrue(0 < e < 8)
- self.assertTrue(type(e) is WeekDay)
- self.assertTrue(isinstance(e, int))
- self.assertTrue(isinstance(e, Enum))
-
- def test_intenum_duplicates(self):
- class WeekDay(IntEnum):
- __order__ = 'SUNDAY MONDAY TUESDAY WEDNESDAY THURSDAY FRIDAY SATURDAY'
- SUNDAY = 1
- MONDAY = 2
- TUESDAY = TEUSDAY = 3
- WEDNESDAY = 4
- THURSDAY = 5
- FRIDAY = 6
- SATURDAY = 7
- self.assertTrue(WeekDay.TEUSDAY is WeekDay.TUESDAY)
- self.assertEqual(WeekDay(3).name, 'TUESDAY')
- self.assertEqual([k for k,v in WeekDay.__members__.items()
- if v.name != k], ['TEUSDAY', ])
-
- def test_pickle_enum(self):
- if isinstance(Stooges, Exception):
- raise Stooges
- test_pickle_dump_load(self.assertTrue, Stooges.CURLY)
- test_pickle_dump_load(self.assertTrue, Stooges)
-
- def test_pickle_int(self):
- if isinstance(IntStooges, Exception):
- raise IntStooges
- test_pickle_dump_load(self.assertTrue, IntStooges.CURLY)
- test_pickle_dump_load(self.assertTrue, IntStooges)
-
- def test_pickle_float(self):
- if isinstance(FloatStooges, Exception):
- raise FloatStooges
- test_pickle_dump_load(self.assertTrue, FloatStooges.CURLY)
- test_pickle_dump_load(self.assertTrue, FloatStooges)
-
- def test_pickle_enum_function(self):
- if isinstance(Answer, Exception):
- raise Answer
- test_pickle_dump_load(self.assertTrue, Answer.him)
- test_pickle_dump_load(self.assertTrue, Answer)
-
- def test_pickle_enum_function_with_module(self):
- if isinstance(Question, Exception):
- raise Question
- test_pickle_dump_load(self.assertTrue, Question.who)
- test_pickle_dump_load(self.assertTrue, Question)
-
- if pyver == 3.4:
- def test_class_nested_enum_and_pickle_protocol_four(self):
- # would normally just have this directly in the class namespace
- class NestedEnum(Enum):
- twigs = 'common'
- shiny = 'rare'
-
- self.__class__.NestedEnum = NestedEnum
- self.NestedEnum.__qualname__ = '%s.NestedEnum' % self.__class__.__name__
- test_pickle_exception(
- self.assertRaises, PicklingError, self.NestedEnum.twigs,
- protocol=(0, 3))
- test_pickle_dump_load(self.assertTrue, self.NestedEnum.twigs,
- protocol=(4, HIGHEST_PROTOCOL))
-
- elif pyver == 3.5:
- def test_class_nested_enum_and_pickle_protocol_four(self):
- # would normally just have this directly in the class namespace
- class NestedEnum(Enum):
- twigs = 'common'
- shiny = 'rare'
-
- self.__class__.NestedEnum = NestedEnum
- self.NestedEnum.__qualname__ = '%s.NestedEnum' % self.__class__.__name__
- test_pickle_dump_load(self.assertTrue, self.NestedEnum.twigs,
- protocol=(0, HIGHEST_PROTOCOL))
-
- def test_exploding_pickle(self):
- BadPickle = Enum('BadPickle', 'dill sweet bread_n_butter')
- enum._make_class_unpicklable(BadPickle)
- globals()['BadPickle'] = BadPickle
- test_pickle_exception(self.assertRaises, TypeError, BadPickle.dill)
- test_pickle_exception(self.assertRaises, PicklingError, BadPickle)
-
- def test_string_enum(self):
- class SkillLevel(str, Enum):
- master = 'what is the sound of one hand clapping?'
- journeyman = 'why did the chicken cross the road?'
- apprentice = 'knock, knock!'
- self.assertEqual(SkillLevel.apprentice, 'knock, knock!')
-
- def test_getattr_getitem(self):
- class Period(Enum):
- morning = 1
- noon = 2
- evening = 3
- night = 4
- self.assertTrue(Period(2) is Period.noon)
- self.assertTrue(getattr(Period, 'night') is Period.night)
- self.assertTrue(Period['morning'] is Period.morning)
-
- def test_getattr_dunder(self):
- Season = self.Season
- self.assertTrue(getattr(Season, '__hash__'))
-
- def test_iteration_order(self):
- class Season(Enum):
- _order_ = 'SUMMER WINTER AUTUMN SPRING'
- SUMMER = 2
- WINTER = 4
- AUTUMN = 3
- SPRING = 1
- self.assertEqual(
- list(Season),
- [Season.SUMMER, Season.WINTER, Season.AUTUMN, Season.SPRING],
- )
-
- def test_iteration_order_reversed(self):
- self.assertEqual(
- list(reversed(self.Season)),
- [self.Season.WINTER, self.Season.AUTUMN, self.Season.SUMMER,
- self.Season.SPRING]
- )
-
- def test_iteration_order_with_unorderable_values(self):
- class Complex(Enum):
- a = complex(7, 9)
- b = complex(3.14, 2)
- c = complex(1, -1)
- d = complex(-77, 32)
- self.assertEqual(
- list(Complex),
- [Complex.a, Complex.b, Complex.c, Complex.d],
- )
-
- def test_programatic_function_string(self):
- SummerMonth = Enum('SummerMonth', 'june july august')
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_string_with_start(self):
- SummerMonth = Enum('SummerMonth', 'june july august', start=10)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split(), 10):
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_string_list(self):
- SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'])
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_string_list_with_start(self):
- SummerMonth = Enum('SummerMonth', ['june', 'july', 'august'], start=20)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split(), 20):
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_iterable(self):
- SummerMonth = Enum(
- 'SummerMonth',
- (('june', 1), ('july', 2), ('august', 3))
- )
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_iterable_with_weird_names(self):
- SummerMonth = Enum(
- 'SummerMonth',
- (('june', 1), ('july', 2), ('august', 3), ('fabulous september', 4))
- )
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 4, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august, SummerMonth['fabulous september']],
- lst,
- )
- for i, month in enumerate('june july august'.split() + ['fabulous september']):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_from_dict(self):
- SummerMonth = Enum(
- 'SummerMonth',
- dict((('june', 1), ('july', 2), ('august', 3)))
- )
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- if pyver < 3.0:
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_type(self):
- SummerMonth = Enum('SummerMonth', 'june july august', type=int)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_type_with_start(self):
- SummerMonth = Enum('SummerMonth', 'june july august', type=int, start=30)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split(), 30):
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_type_from_subclass(self):
- SummerMonth = IntEnum('SummerMonth', 'june july august')
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_type_from_subclass_with_start(self):
- SummerMonth = IntEnum('SummerMonth', 'june july august', start=40)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate('june july august'.split(), 40):
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_unicode(self):
- SummerMonth = Enum('SummerMonth', unicode('june july august'))
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_unicode_list(self):
- SummerMonth = Enum('SummerMonth', [unicode('june'), unicode('july'), unicode('august')])
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_unicode_iterable(self):
- SummerMonth = Enum(
- 'SummerMonth',
- ((unicode('june'), 1), (unicode('july'), 2), (unicode('august'), 3))
- )
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_from_unicode_dict(self):
- SummerMonth = Enum(
- 'SummerMonth',
- dict(((unicode('june'), 1), (unicode('july'), 2), (unicode('august'), 3)))
- )
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- if pyver < 3.0:
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(int(e.value), i)
- self.assertNotEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_unicode_type(self):
- SummerMonth = Enum('SummerMonth', unicode('june july august'), type=int)
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programatic_function_unicode_type_from_subclass(self):
- SummerMonth = IntEnum('SummerMonth', unicode('june july august'))
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(e, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_programmatic_function_unicode_class(self):
- if pyver < 3.0:
- class_names = unicode('SummerMonth'), 'S\xfcmm\xe9rM\xf6nth'.decode('latin1')
- else:
- class_names = 'SummerMonth', 'S\xfcmm\xe9rM\xf6nth'
- for i, class_name in enumerate(class_names):
- if pyver < 3.0 and i == 1:
- self.assertRaises(TypeError, Enum, class_name, unicode('june july august'))
- else:
- SummerMonth = Enum(class_name, unicode('june july august'))
- lst = list(SummerMonth)
- self.assertEqual(len(lst), len(SummerMonth))
- self.assertEqual(len(SummerMonth), 3, SummerMonth)
- self.assertEqual(
- [SummerMonth.june, SummerMonth.july, SummerMonth.august],
- lst,
- )
- for i, month in enumerate(unicode('june july august').split()):
- i += 1
- e = SummerMonth(i)
- self.assertEqual(e.value, i)
- self.assertEqual(e.name, month)
- self.assertTrue(e in SummerMonth)
- self.assertTrue(type(e) is SummerMonth)
-
- def test_subclassing(self):
- if isinstance(Name, Exception):
- raise Name
- self.assertEqual(Name.BDFL, 'Guido van Rossum')
- self.assertTrue(Name.BDFL, Name('Guido van Rossum'))
- self.assertTrue(Name.BDFL is getattr(Name, 'BDFL'))
- test_pickle_dump_load(self.assertTrue, Name.BDFL)
-
- def test_extending(self):
- def bad_extension():
- class Color(Enum):
- red = 1
- green = 2
- blue = 3
- class MoreColor(Color):
- cyan = 4
- magenta = 5
- yellow = 6
- self.assertRaises(TypeError, bad_extension)
-
- def test_exclude_methods(self):
- class whatever(Enum):
- this = 'that'
- these = 'those'
- def really(self):
- return 'no, not %s' % self.value
- self.assertFalse(type(whatever.really) is whatever)
- self.assertEqual(whatever.this.really(), 'no, not that')
-
- def test_wrong_inheritance_order(self):
- def wrong_inherit():
- class Wrong(Enum, str):
- NotHere = 'error before this point'
- self.assertRaises(TypeError, wrong_inherit)
-
- def test_intenum_transitivity(self):
- class number(IntEnum):
- one = 1
- two = 2
- three = 3
- class numero(IntEnum):
- uno = 1
- dos = 2
- tres = 3
- self.assertEqual(number.one, numero.uno)
- self.assertEqual(number.two, numero.dos)
- self.assertEqual(number.three, numero.tres)
-
- def test_introspection(self):
- class Number(IntEnum):
- one = 100
- two = 200
- self.assertTrue(Number.one._member_type_ is int)
- self.assertTrue(Number._member_type_ is int)
- class String(str, Enum):
- yarn = 'soft'
- rope = 'rough'
- wire = 'hard'
- self.assertTrue(String.yarn._member_type_ is str)
- self.assertTrue(String._member_type_ is str)
- class Plain(Enum):
- vanilla = 'white'
- one = 1
- self.assertTrue(Plain.vanilla._member_type_ is object)
- self.assertTrue(Plain._member_type_ is object)
-
- def test_wrong_enum_in_call(self):
- class Monochrome(Enum):
- black = 0
- white = 1
- class Gender(Enum):
- male = 0
- female = 1
- self.assertRaises(ValueError, Monochrome, Gender.male)
-
- def test_wrong_enum_in_mixed_call(self):
- class Monochrome(IntEnum):
- black = 0
- white = 1
- class Gender(Enum):
- male = 0
- female = 1
- self.assertRaises(ValueError, Monochrome, Gender.male)
-
- def test_mixed_enum_in_call_1(self):
- class Monochrome(IntEnum):
- black = 0
- white = 1
- class Gender(IntEnum):
- male = 0
- female = 1
- self.assertTrue(Monochrome(Gender.female) is Monochrome.white)
-
- def test_mixed_enum_in_call_2(self):
- class Monochrome(Enum):
- black = 0
- white = 1
- class Gender(IntEnum):
- male = 0
- female = 1
- self.assertTrue(Monochrome(Gender.male) is Monochrome.black)
-
- def test_flufl_enum(self):
- class Fluflnum(Enum):
- def __int__(self):
- return int(self.value)
- class MailManOptions(Fluflnum):
- option1 = 1
- option2 = 2
- option3 = 3
- self.assertEqual(int(MailManOptions.option1), 1)
-
- def test_no_such_enum_member(self):
- class Color(Enum):
- red = 1
- green = 2
- blue = 3
- self.assertRaises(ValueError, Color, 4)
- self.assertRaises(KeyError, Color.__getitem__, 'chartreuse')
-
- def test_new_repr(self):
- class Color(Enum):
- red = 1
- green = 2
- blue = 3
- def __repr__(self):
- return "don't you just love shades of %s?" % self.name
- self.assertEqual(
- repr(Color.blue),
- "don't you just love shades of blue?",
- )
-
- def test_inherited_repr(self):
- class MyEnum(Enum):
- def __repr__(self):
- return "My name is %s." % self.name
- class MyIntEnum(int, MyEnum):
- this = 1
- that = 2
- theother = 3
- self.assertEqual(repr(MyIntEnum.that), "My name is that.")
-
- def test_multiple_mixin_mro(self):
- class auto_enum(EnumMeta):
- def __new__(metacls, cls, bases, classdict):
- original_dict = classdict
- classdict = enum._EnumDict()
- for k, v in original_dict.items():
- classdict[k] = v
- temp = type(classdict)()
- names = set(classdict._member_names)
- i = 0
- for k in classdict._member_names:
- v = classdict[k]
- if v == ():
- v = i
- else:
- i = v
- i += 1
- temp[k] = v
- for k, v in classdict.items():
- if k not in names:
- temp[k] = v
- return super(auto_enum, metacls).__new__(
- metacls, cls, bases, temp)
-
- AutoNumberedEnum = auto_enum('AutoNumberedEnum', (Enum,), {})
-
- AutoIntEnum = auto_enum('AutoIntEnum', (IntEnum,), {})
-
- class TestAutoNumber(AutoNumberedEnum):
- a = ()
- b = 3
- c = ()
-
- class TestAutoInt(AutoIntEnum):
- a = ()
- b = 3
- c = ()
-
- def test_subclasses_with_getnewargs(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt' # needed for pickle protocol 4
- def __new__(cls, *args):
- _args = args
- if len(args) < 1:
- raise TypeError("name and value must be specified")
- name, args = args[0], args[1:]
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- def __getnewargs__(self):
- return self._args
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "%s(%r, %s)" % (type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '(%s + %s)' % (self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI' # needed for pickle protocol 4
- x = ('the-x', 1)
- y = ('the-y', 2)
-
- self.assertTrue(NEI.__new__ is Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- test_pickle_dump_load(self.assertTrue, NI5, 5)
- self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertTrue, NEI.y)
-
- if pyver >= 3.4:
- def test_subclasses_with_getnewargs_ex(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt' # needed for pickle protocol 4
- def __new__(cls, *args):
- _args = args
- if len(args) < 2:
- raise TypeError("name and value must be specified")
- name, args = args[0], args[1:]
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- def __getnewargs_ex__(self):
- return self._args, {}
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "{}({!r}, {})".format(type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '({0} + {1})'.format(self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI' # needed for pickle protocol 4
- x = ('the-x', 1)
- y = ('the-y', 2)
-
-
- self.assertIs(NEI.__new__, Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- test_pickle_dump_load(self.assertEqual, NI5, 5, protocol=(4, HIGHEST_PROTOCOL))
- self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertTrue, NEI.y, protocol=(4, HIGHEST_PROTOCOL))
-
- def test_subclasses_with_reduce(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt' # needed for pickle protocol 4
- def __new__(cls, *args):
- _args = args
- if len(args) < 1:
- raise TypeError("name and value must be specified")
- name, args = args[0], args[1:]
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- def __reduce__(self):
- return self.__class__, self._args
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "%s(%r, %s)" % (type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '(%s + %s)' % (self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI' # needed for pickle protocol 4
- x = ('the-x', 1)
- y = ('the-y', 2)
-
-
- self.assertTrue(NEI.__new__ is Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- test_pickle_dump_load(self.assertEqual, NI5, 5)
- self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertTrue, NEI.y)
-
- def test_subclasses_with_reduce_ex(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt' # needed for pickle protocol 4
- def __new__(cls, *args):
- _args = args
- if len(args) < 1:
- raise TypeError("name and value must be specified")
- name, args = args[0], args[1:]
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- def __reduce_ex__(self, proto):
- return self.__class__, self._args
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "%s(%r, %s)" % (type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '(%s + %s)' % (self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI' # needed for pickle protocol 4
- x = ('the-x', 1)
- y = ('the-y', 2)
-
-
- self.assertTrue(NEI.__new__ is Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- test_pickle_dump_load(self.assertEqual, NI5, 5)
- self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertTrue, NEI.y)
-
- def test_subclasses_without_direct_pickle_support(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt'
- def __new__(cls, *args):
- _args = args
- name, args = args[0], args[1:]
- if len(args) == 0:
- raise TypeError("name and value must be specified")
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "%s(%r, %s)" % (type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '(%s + %s)' % (self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI'
- x = ('the-x', 1)
- y = ('the-y', 2)
-
- self.assertTrue(NEI.__new__ is Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- self.assertEqual(NEI.y.value, 2)
- test_pickle_exception(self.assertRaises, TypeError, NEI.x)
- test_pickle_exception(self.assertRaises, PicklingError, NEI)
-
- def test_subclasses_without_direct_pickle_support_using_name(self):
- class NamedInt(int):
- __qualname__ = 'NamedInt'
- def __new__(cls, *args):
- _args = args
- name, args = args[0], args[1:]
- if len(args) == 0:
- raise TypeError("name and value must be specified")
- self = int.__new__(cls, *args)
- self._intname = name
- self._args = _args
- return self
- @property
- def __name__(self):
- return self._intname
- def __repr__(self):
- # repr() is updated to include the name and type info
- return "%s(%r, %s)" % (type(self).__name__,
- self.__name__,
- int.__repr__(self))
- def __str__(self):
- # str() is unchanged, even if it relies on the repr() fallback
- base = int
- base_str = base.__str__
- if base_str.__objclass__ is object:
- return base.__repr__(self)
- return base_str(self)
- # for simplicity, we only define one operator that
- # propagates expressions
- def __add__(self, other):
- temp = int(self) + int( other)
- if isinstance(self, NamedInt) and isinstance(other, NamedInt):
- return NamedInt(
- '(%s + %s)' % (self.__name__, other.__name__),
- temp )
- else:
- return temp
-
- class NEI(NamedInt, Enum):
- __qualname__ = 'NEI'
- x = ('the-x', 1)
- y = ('the-y', 2)
- def __reduce_ex__(self, proto):
- return getattr, (self.__class__, self._name_)
-
- self.assertTrue(NEI.__new__ is Enum.__new__)
- self.assertEqual(repr(NEI.x + NEI.y), "NamedInt('(the-x + the-y)', 3)")
- globals()['NamedInt'] = NamedInt
- globals()['NEI'] = NEI
- NI5 = NamedInt('test', 5)
- self.assertEqual(NI5, 5)
- self.assertEqual(NEI.y.value, 2)
- test_pickle_dump_load(self.assertTrue, NEI.y)
- test_pickle_dump_load(self.assertTrue, NEI)
-
- def test_tuple_subclass(self):
- class SomeTuple(tuple, Enum):
- __qualname__ = 'SomeTuple'
- first = (1, 'for the money')
- second = (2, 'for the show')
- third = (3, 'for the music')
- self.assertTrue(type(SomeTuple.first) is SomeTuple)
- self.assertTrue(isinstance(SomeTuple.second, tuple))
- self.assertEqual(SomeTuple.third, (3, 'for the music'))
- globals()['SomeTuple'] = SomeTuple
- test_pickle_dump_load(self.assertTrue, SomeTuple.first)
-
- def test_duplicate_values_give_unique_enum_items(self):
- class AutoNumber(Enum):
- __order__ = 'enum_m enum_d enum_y'
- enum_m = ()
- enum_d = ()
- enum_y = ()
- def __new__(cls):
- value = len(cls.__members__) + 1
- obj = object.__new__(cls)
- obj._value_ = value
- return obj
- def __int__(self):
- return int(self._value_)
- self.assertEqual(int(AutoNumber.enum_d), 2)
- self.assertEqual(AutoNumber.enum_y.value, 3)
- self.assertTrue(AutoNumber(1) is AutoNumber.enum_m)
- self.assertEqual(
- list(AutoNumber),
- [AutoNumber.enum_m, AutoNumber.enum_d, AutoNumber.enum_y],
- )
-
- def test_inherited_new_from_enhanced_enum(self):
- class AutoNumber2(Enum):
- def __new__(cls):
- value = len(cls.__members__) + 1
- obj = object.__new__(cls)
- obj._value_ = value
- return obj
- def __int__(self):
- return int(self._value_)
- class Color(AutoNumber2):
- _order_ = 'red green blue'
- red = ()
- green = ()
- blue = ()
- self.assertEqual(len(Color), 3, "wrong number of elements: %d (should be %d)" % (len(Color), 3))
- self.assertEqual(list(Color), [Color.red, Color.green, Color.blue])
- if pyver >= 3.0:
- self.assertEqual(list(map(int, Color)), [1, 2, 3])
-
- def test_inherited_new_from_mixed_enum(self):
- class AutoNumber3(IntEnum):
- def __new__(cls):
- value = len(cls.__members__) + 1
- obj = int.__new__(cls, value)
- obj._value_ = value
- return obj
- class Color(AutoNumber3):
- red = ()
- green = ()
- blue = ()
- self.assertEqual(len(Color), 3, "wrong number of elements: %d (should be %d)" % (len(Color), 3))
- Color.red
- Color.green
- Color.blue
-
- def test_equality(self):
- class AlwaysEqual:
- def __eq__(self, other):
- return True
- class OrdinaryEnum(Enum):
- a = 1
- self.assertEqual(AlwaysEqual(), OrdinaryEnum.a)
- self.assertEqual(OrdinaryEnum.a, AlwaysEqual())
-
- def test_ordered_mixin(self):
- class OrderedEnum(Enum):
- def __ge__(self, other):
- if self.__class__ is other.__class__:
- return self._value_ >= other._value_
- return NotImplemented
- def __gt__(self, other):
- if self.__class__ is other.__class__:
- return self._value_ > other._value_
- return NotImplemented
- def __le__(self, other):
- if self.__class__ is other.__class__:
- return self._value_ <= other._value_
- return NotImplemented
- def __lt__(self, other):
- if self.__class__ is other.__class__:
- return self._value_ < other._value_
- return NotImplemented
- class Grade(OrderedEnum):
- __order__ = 'A B C D F'
- A = 5
- B = 4
- C = 3
- D = 2
- F = 1
- self.assertEqual(list(Grade), [Grade.A, Grade.B, Grade.C, Grade.D, Grade.F])
- self.assertTrue(Grade.A > Grade.B)
- self.assertTrue(Grade.F <= Grade.C)
- self.assertTrue(Grade.D < Grade.A)
- self.assertTrue(Grade.B >= Grade.B)
-
- def test_extending2(self):
- def bad_extension():
- class Shade(Enum):
- def shade(self):
- print(self.name)
- class Color(Shade):
- red = 1
- green = 2
- blue = 3
- class MoreColor(Color):
- cyan = 4
- magenta = 5
- yellow = 6
- self.assertRaises(TypeError, bad_extension)
-
- def test_extending3(self):
- class Shade(Enum):
- def shade(self):
- return self.name
- class Color(Shade):
- def hex(self):
- return '%s hexlified!' % self.value
- class MoreColor(Color):
- cyan = 4
- magenta = 5
- yellow = 6
- self.assertEqual(MoreColor.magenta.hex(), '5 hexlified!')
-
- def test_no_duplicates(self):
- def bad_duplicates():
- class UniqueEnum(Enum):
- def __init__(self, *args):
- cls = self.__class__
- if any(self.value == e.value for e in cls):
- a = self.name
- e = cls(self.value).name
- raise ValueError(
- "aliases not allowed in UniqueEnum: %r --> %r"
- % (a, e)
- )
- class Color(UniqueEnum):
- red = 1
- green = 2
- blue = 3
- class Color(UniqueEnum):
- red = 1
- green = 2
- blue = 3
- grene = 2
- self.assertRaises(ValueError, bad_duplicates)
-
- def test_init(self):
- class Planet(Enum):
- MERCURY = (3.303e+23, 2.4397e6)
- VENUS = (4.869e+24, 6.0518e6)
- EARTH = (5.976e+24, 6.37814e6)
- MARS = (6.421e+23, 3.3972e6)
- JUPITER = (1.9e+27, 7.1492e7)
- SATURN = (5.688e+26, 6.0268e7)
- URANUS = (8.686e+25, 2.5559e7)
- NEPTUNE = (1.024e+26, 2.4746e7)
- def __init__(self, mass, radius):
- self.mass = mass # in kilograms
- self.radius = radius # in meters
- @property
- def surface_gravity(self):
- # universal gravitational constant (m3 kg-1 s-2)
- G = 6.67300E-11
- return G * self.mass / (self.radius * self.radius)
- self.assertEqual(round(Planet.EARTH.surface_gravity, 2), 9.80)
- self.assertEqual(Planet.EARTH.value, (5.976e+24, 6.37814e6))
-
- def test_nonhash_value(self):
- class AutoNumberInAList(Enum):
- def __new__(cls):
- value = [len(cls.__members__) + 1]
- obj = object.__new__(cls)
- obj._value_ = value
- return obj
- class ColorInAList(AutoNumberInAList):
- _order_ = 'red green blue'
- red = ()
- green = ()
- blue = ()
- self.assertEqual(list(ColorInAList), [ColorInAList.red, ColorInAList.green, ColorInAList.blue])
- self.assertEqual(ColorInAList.red.value, [1])
- self.assertEqual(ColorInAList([1]), ColorInAList.red)
-
- def test_conflicting_types_resolved_in_new(self):
- class LabelledIntEnum(int, Enum):
- def __new__(cls, *args):
- value, label = args
- obj = int.__new__(cls, value)
- obj.label = label
- obj._value_ = value
- return obj
-
- class LabelledList(LabelledIntEnum):
- unprocessed = (1, "Unprocessed")
- payment_complete = (2, "Payment Complete")
-
- self.assertEqual(list(LabelledList), [LabelledList.unprocessed, LabelledList.payment_complete])
- self.assertEqual(LabelledList.unprocessed, 1)
- self.assertEqual(LabelledList(1), LabelledList.unprocessed)
-
- def test_empty_with_functional_api(self):
- empty = enum.IntEnum('Foo', {})
- self.assertEqual(len(empty), 0)
-
-
-class TestUnique(unittest.TestCase):
- """2.4 doesn't allow class decorators, use function syntax."""
-
- def test_unique_clean(self):
- class Clean(Enum):
- one = 1
- two = 'dos'
- tres = 4.0
- unique(Clean)
- class Cleaner(IntEnum):
- single = 1
- double = 2
- triple = 3
- unique(Cleaner)
-
- def test_unique_dirty(self):
- try:
- class Dirty(Enum):
- __order__ = 'one two tres'
- one = 1
- two = 'dos'
- tres = 1
- unique(Dirty)
- except ValueError:
- exc = sys.exc_info()[1]
- message = exc.args[0]
- self.assertTrue('tres -> one' in message)
-
- try:
- class Dirtier(IntEnum):
- _order_ = 'single double triple turkey'
- single = 1
- double = 1
- triple = 3
- turkey = 3
- unique(Dirtier)
- except ValueError:
- exc = sys.exc_info()[1]
- message = exc.args[0]
- self.assertTrue('double -> single' in message)
- self.assertTrue('turkey -> triple' in message)
-
-
-class TestMe(unittest.TestCase):
-
- pass
-
-if __name__ == '__main__':
- unittest.main()
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/PKG-INFO b/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/PKG-INFO
deleted file mode 100644
index 98927c4d99d..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/PKG-INFO
+++ /dev/null
@@ -1,62 +0,0 @@
-Metadata-Version: 1.1
-Name: enum34
-Version: 1.1.6
-Summary: Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4
-Home-page: https://bitbucket.org/stoneleaf/enum34
-Author: Ethan Furman
-Author-email: ethan@stoneleaf.us
-License: BSD License
-Description: enum --- support for enumerations
- ========================================
-
- An enumeration is a set of symbolic names (members) bound to unique, constant
- values. Within an enumeration, the members can be compared by identity, and
- the enumeration itself can be iterated over.
-
- from enum import Enum
-
- class Fruit(Enum):
- apple = 1
- banana = 2
- orange = 3
-
- list(Fruit)
- # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]
-
- len(Fruit)
- # 3
-
- Fruit.banana
- # <Fruit.banana: 2>
-
- Fruit['banana']
- # <Fruit.banana: 2>
-
- Fruit(2)
- # <Fruit.banana: 2>
-
- Fruit.banana is Fruit['banana'] is Fruit(2)
- # True
-
- Fruit.banana.name
- # 'banana'
-
- Fruit.banana.value
- # 2
-
- Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
-
-Platform: UNKNOWN
-Classifier: Development Status :: 5 - Production/Stable
-Classifier: Intended Audience :: Developers
-Classifier: License :: OSI Approved :: BSD License
-Classifier: Programming Language :: Python
-Classifier: Topic :: Software Development
-Classifier: Programming Language :: Python :: 2.4
-Classifier: Programming Language :: Python :: 2.5
-Classifier: Programming Language :: Python :: 2.6
-Classifier: Programming Language :: Python :: 2.7
-Classifier: Programming Language :: Python :: 3.3
-Classifier: Programming Language :: Python :: 3.4
-Classifier: Programming Language :: Python :: 3.5
-Provides: enum
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/SOURCES.txt b/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/SOURCES.txt
deleted file mode 100644
index e6855e653cf..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/SOURCES.txt
+++ /dev/null
@@ -1,13 +0,0 @@
-MANIFEST.in
-README
-setup.py
-enum/LICENSE
-enum/README
-enum/__init__.py
-enum/test.py
-enum/doc/enum.pdf
-enum/doc/enum.rst
-enum34.egg-info/PKG-INFO
-enum34.egg-info/SOURCES.txt
-enum34.egg-info/dependency_links.txt
-enum34.egg-info/top_level.txt \ No newline at end of file
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/dependency_links.txt b/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/dependency_links.txt
deleted file mode 100644
index 8b137891791..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/dependency_links.txt
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/top_level.txt b/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/top_level.txt
deleted file mode 100644
index e3caefb45c4..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/enum34.egg-info/top_level.txt
+++ /dev/null
@@ -1 +0,0 @@
-enum
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/setup.cfg b/tests/wpt/web-platform-tests/tools/third_party/enum/setup.cfg
deleted file mode 100644
index 8bfd5a12f85..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/setup.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-[egg_info]
-tag_build =
-tag_date = 0
-
diff --git a/tests/wpt/web-platform-tests/tools/third_party/enum/setup.py b/tests/wpt/web-platform-tests/tools/third_party/enum/setup.py
deleted file mode 100644
index f54071e7f0c..00000000000
--- a/tests/wpt/web-platform-tests/tools/third_party/enum/setup.py
+++ /dev/null
@@ -1,105 +0,0 @@
-import os
-import sys
-import setuptools
-from distutils.core import setup
-
-
-if sys.version_info[:2] < (2, 7):
- required = ['ordereddict']
-else:
- required = []
-
-# Don't shadow builtin enum package if we are being installed on a
-# recent Python. This causes conflicts since at least 3.6:
-# https://bitbucket.org/stoneleaf/enum34/issues/19/enum34-isnt-compatible-with-python-36
-if sys.version_info[:2] < (3, 4):
- packages = ['enum']
-else:
- packages = []
-
-long_desc = '''\
-enum --- support for enumerations
-========================================
-
-An enumeration is a set of symbolic names (members) bound to unique, constant
-values. Within an enumeration, the members can be compared by identity, and
-the enumeration itself can be iterated over.
-
- from enum import Enum
-
- class Fruit(Enum):
- apple = 1
- banana = 2
- orange = 3
-
- list(Fruit)
- # [<Fruit.apple: 1>, <Fruit.banana: 2>, <Fruit.orange: 3>]
-
- len(Fruit)
- # 3
-
- Fruit.banana
- # <Fruit.banana: 2>
-
- Fruit['banana']
- # <Fruit.banana: 2>
-
- Fruit(2)
- # <Fruit.banana: 2>
-
- Fruit.banana is Fruit['banana'] is Fruit(2)
- # True
-
- Fruit.banana.name
- # 'banana'
-
- Fruit.banana.value
- # 2
-
-Repository and Issue Tracker at https://bitbucket.org/stoneleaf/enum34.
-'''
-
-py2_only = ()
-py3_only = ()
-make = [
- # 'rst2pdf enum/doc/enum.rst --output=enum/doc/enum.pdf',
- ]
-
-
-data = dict(
- name='enum34',
- version='1.1.10',
- url='https://bitbucket.org/stoneleaf/enum34',
- packages=packages,
- package_data={
- 'enum' : [
- 'LICENSE',
- 'README',
- 'doc/enum.rst',
- 'doc/enum.pdf',
- 'test.py',
- ]
- },
- license='BSD License',
- description='Python 3.4 Enum backported to 3.3, 3.2, 3.1, 2.7, 2.6, 2.5, and 2.4',
- long_description=long_desc,
- provides=['enum'],
- install_requires=required,
- author='Ethan Furman',
- author_email='ethan@stoneleaf.us',
- classifiers=[
- 'Development Status :: 5 - Production/Stable',
- 'Intended Audience :: Developers',
- 'License :: OSI Approved :: BSD License',
- 'Programming Language :: Python',
- 'Topic :: Software Development',
- 'Programming Language :: Python :: 2.4',
- 'Programming Language :: Python :: 2.5',
- 'Programming Language :: Python :: 2.6',
- 'Programming Language :: Python :: 2.7',
- 'Programming Language :: Python :: 3.3',
- ],
- )
-
-if __name__ == '__main__':
- setup(**data)
diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/error.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/error.py
index 5a169aa9847..6a02e65ba5a 100644
--- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/error.py
+++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/bidi/error.py
@@ -9,7 +9,7 @@ class BidiException(Exception):
# The error_code class variable is used to map the JSON Error Code (see
# https://w3c.github.io/webdriver/#errors) to a BidiException subclass.
# TODO: Match on error and let it be a class variables only.
- error_code = None # type: ClassVar[str]
+ error_code: ClassVar[str]
def __init__(self, message: str, stacktrace: Optional[str] = None):
super()
@@ -82,5 +82,5 @@ def get(error_code: str) -> Type[BidiException]:
_errors: DefaultDict[str, Type[BidiException]] = collections.defaultdict()
for item in list(locals().values()):
- if type(item) == type and issubclass(item, BidiException):
+ if type(item) == type and item != BidiException and issubclass(item, BidiException):
_errors[item.error_code] = item
diff --git a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
index 1b67d3325ad..7d5d914a20c 100644
--- a/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
+++ b/tests/wpt/web-platform-tests/tools/webdriver/webdriver/error.py
@@ -12,8 +12,8 @@ class WebDriverException(Exception):
# However, http_status need not match, and both are set as instance
# variables, shadowing the class variables. TODO: Match on both http_status
# and status_code and let these be class variables only.
- http_status = None # type: ClassVar[int]
- status_code = None # type: ClassVar[str]
+ http_status: ClassVar[int]
+ status_code: ClassVar[str]
def __init__(self, http_status=None, status_code=None, message=None, stacktrace=None):
super()
@@ -228,5 +228,5 @@ def get(error_code):
_errors: DefaultDict[str, Type[WebDriverException]] = collections.defaultdict()
for item in list(locals().values()):
- if type(item) == type and issubclass(item, WebDriverException):
+ if type(item) == type and item != WebDriverException and issubclass(item, WebDriverException):
_errors[item.status_code] = item
diff --git a/tests/wpt/web-platform-tests/tools/wpt/browser.py b/tests/wpt/web-platform-tests/tools/wpt/browser.py
index 7a046e8f07c..e40739e4b74 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/browser.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/browser.py
@@ -8,7 +8,7 @@ import subprocess
import tempfile
from abc import ABCMeta, abstractmethod
from datetime import datetime, timedelta, timezone
-from distutils.spawn import find_executable
+from shutil import which
from urllib.parse import urlsplit
import html5lib
@@ -294,7 +294,7 @@ class Firefox(Browser):
binary = None
if self.platform == "linux":
- binary = find_executable("firefox", os.path.join(path, "firefox"))
+ binary = which("firefox", path=os.path.join(path, "firefox"))
elif self.platform == "win":
import mozinstall
try:
@@ -303,8 +303,10 @@ class Firefox(Browser):
# ignore the case where we fail to get a binary
pass
elif self.platform == "macos":
- binary = find_executable("firefox", os.path.join(path, self.application_name.get(channel, "Firefox Nightly.app"),
- "Contents", "MacOS"))
+ binary = which("firefox",
+ path=os.path.join(path,
+ self.application_name.get(channel, "Firefox Nightly.app"),
+ "Contents", "MacOS"))
return binary
@@ -328,15 +330,15 @@ class Firefox(Browser):
os.path.expanduser("~/Applications/Firefox Developer Edition.app/Contents/MacOS"),
"/Applications/Firefox.app/Contents/MacOS",
os.path.expanduser("~/Applications/Firefox.app/Contents/MacOS")]
- return find_executable("firefox", os.pathsep.join(macpaths))
+ return which("firefox", path=os.pathsep.join(macpaths))
if binary is None:
- return find_executable("firefox")
+ return which("firefox")
return binary
def find_certutil(self):
- path = find_executable("certutil")
+ path = which("certutil")
if path is None:
return None
if os.path.splitdrive(os.path.normcase(path))[1].split(os.path.sep) == ["", "windows", "system32", "certutil.exe"]:
@@ -344,7 +346,7 @@ class Firefox(Browser):
return path
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("geckodriver")
+ return which("geckodriver")
def get_version_and_channel(self, binary):
version_string = call(binary, "--version").strip()
@@ -468,7 +470,7 @@ class Firefox(Browser):
unzip(get(url).raw, dest=dest)
else:
untar(get(url).raw, dest=dest)
- path = find_executable(os.path.join(dest, "geckodriver"))
+ path = which("geckodriver", path=dest)
assert path is not None
self.logger.info("Installed %s" %
@@ -642,7 +644,7 @@ class ChromeChromiumBase(Browser):
# There may be an existing chromedriver binary from a previous install.
# To provide a clean install experience, remove the old binary - this
# avoids tricky issues like unzipping over a read-only file.
- existing_chromedriver_path = find_executable("chromedriver", path)
+ existing_chromedriver_path = which("chromedriver", path=path)
if existing_chromedriver_path:
self.logger.info(f"Removing existing ChromeDriver binary: {existing_chromedriver_path}")
os.chmod(existing_chromedriver_path, stat.S_IWUSR)
@@ -677,7 +679,7 @@ class ChromeChromiumBase(Browser):
def find_webdriver(self, venv_path=None, channel=None, browser_binary=None):
if venv_path:
venv_path = os.path.join(venv_path, self.product)
- return find_executable("chromedriver", path=venv_path)
+ return which("chromedriver", path=venv_path)
def install_mojojs(self, dest, browser_binary):
"""Install MojoJS web framework."""
@@ -742,12 +744,12 @@ class ChromeChromiumBase(Browser):
# We want to make sure the binary always ends up directly in bin/.
chromedriver_dir = os.path.join(dest,
f"chromedriver_{self._chromedriver_platform_string}")
- chromedriver_path = find_executable("chromedriver", chromedriver_dir)
+ chromedriver_path = which("chromedriver", path=chromedriver_dir)
if chromedriver_path is not None:
shutil.move(chromedriver_path, dest)
rmtree(chromedriver_dir)
- chromedriver_path = find_executable("chromedriver", dest)
+ chromedriver_path = which("chromedriver", path=dest)
assert chromedriver_path is not None
return chromedriver_path
@@ -819,13 +821,13 @@ class Chromium(ChromeChromiumBase):
def _find_binary_in_directory(self, directory):
"""Search for Chromium browser binary in a given directory."""
if uname[0] == "Darwin":
- return find_executable("Chromium", os.path.join(directory,
- self._chromium_package_name,
- "Chromium.app",
- "Contents",
- "MacOS"))
- # find_executable will add .exe on Windows automatically.
- return find_executable("chrome", os.path.join(directory, self._chromium_package_name))
+ return which("Chromium", path=os.path.join(directory,
+ self._chromium_package_name,
+ "Chromium.app",
+ "Contents",
+ "MacOS"))
+ # which will add .exe on Windows automatically.
+ return which("chrome", path=os.path.join(directory, self._chromium_package_name))
def _get_webdriver_url(self, version, revision=None):
"""Get Chromium Snapshots url to download Chromium ChromeDriver."""
@@ -980,7 +982,7 @@ class Chrome(ChromeChromiumBase):
elif channel == "dev":
name += "-unstable"
# No Canary on Linux.
- return find_executable(name)
+ return which(name)
if uname[0] == "Darwin":
suffix = ""
if channel in ("beta", "dev", "canary"):
@@ -1078,8 +1080,8 @@ class ContentShell(Browser):
def find_binary(self, venv_path=None, channel=None):
if uname[0] == "Darwin":
- return find_executable("Content Shell.app/Contents/MacOS/Content Shell")
- return find_executable("content_shell") # .exe is added automatically for Windows
+ return which("Content Shell.app/Contents/MacOS/Content Shell")
+ return which("content_shell") # .exe is added automatically for Windows
def find_webdriver(self, venv_path=None, channel=None):
return None
@@ -1114,7 +1116,7 @@ class ChromeAndroidBase(Browser):
raise NotImplementedError
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("chromedriver")
+ return which("chromedriver")
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
if browser_binary is None:
@@ -1276,7 +1278,7 @@ class Opera(Browser):
raise NotImplementedError
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("operadriver")
+ return which("operadriver")
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
if dest is None:
@@ -1290,7 +1292,7 @@ class Opera(Browser):
shutil.move(os.path.join(operadriver_dir, "operadriver"), dest)
rmtree(operadriver_dir)
- path = find_executable("operadriver")
+ path = which("operadriver")
st = os.stat(path)
os.chmod(path, st.st_mode | stat.S_IEXEC)
return path
@@ -1337,7 +1339,7 @@ class EdgeChromium(Browser):
elif channel == "dev":
name += "-dev"
# No Canary on Linux.
- return find_executable(name)
+ return which(name)
if self.platform == "macos":
suffix = ""
if channel in ("beta", "dev", "canary"):
@@ -1348,25 +1350,25 @@ class EdgeChromium(Browser):
if channel == "beta":
winpaths = [os.path.expandvars("$SYSTEMDRIVE\\Program Files\\Microsoft\\Edge Beta\\Application"),
os.path.expandvars("$SYSTEMDRIVE\\Program Files (x86)\\Microsoft\\Edge Beta\\Application")]
- return find_executable(binaryname, os.pathsep.join(winpaths))
+ return which(binaryname, path=os.pathsep.join(winpaths))
elif channel == "dev":
winpaths = [os.path.expandvars("$SYSTEMDRIVE\\Program Files\\Microsoft\\Edge Dev\\Application"),
os.path.expandvars("$SYSTEMDRIVE\\Program Files (x86)\\Microsoft\\Edge Dev\\Application")]
- return find_executable(binaryname, os.pathsep.join(winpaths))
+ return which(binaryname, path=os.pathsep.join(winpaths))
elif channel == "canary":
winpaths = [os.path.expanduser("~\\AppData\\Local\\Microsoft\\Edge\\Application"),
os.path.expanduser("~\\AppData\\Local\\Microsoft\\Edge SxS\\Application")]
- return find_executable(binaryname, os.pathsep.join(winpaths))
+ return which(binaryname, path=os.pathsep.join(winpaths))
else:
winpaths = [os.path.expandvars("$SYSTEMDRIVE\\Program Files\\Microsoft\\Edge\\Application"),
os.path.expandvars("$SYSTEMDRIVE\\Program Files (x86)\\Microsoft\\Edge\\Application")]
- return find_executable(binaryname, os.pathsep.join(winpaths))
+ return which(binaryname, path=os.pathsep.join(winpaths))
self.logger.warning("Unable to find the browser binary.")
return None
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("msedgedriver")
+ return which("msedgedriver")
def webdriver_supports_browser(self, webdriver_binary, browser_binary):
edgedriver_version = self.webdriver_version(webdriver_binary)
@@ -1420,7 +1422,7 @@ class EdgeChromium(Browser):
unzip(get(url).raw, dest)
if os.path.isfile(edgedriver_path):
self.logger.info(f"Successfully downloaded MSEdgeDriver to {edgedriver_path}")
- return find_executable(self.edgedriver_name, dest)
+ return which(self.edgedriver_name, path=dest)
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
self.logger.info(f"Installing MSEdgeDriver for channel {channel}")
@@ -1503,7 +1505,7 @@ class Edge(Browser):
raise NotImplementedError
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("MicrosoftWebDriver")
+ return which("MicrosoftWebDriver")
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
raise NotImplementedError
@@ -1537,7 +1539,7 @@ class InternetExplorer(Browser):
raise NotImplementedError
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("IEDriverServer.exe")
+ return which("IEDriverServer.exe")
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
raise NotImplementedError
@@ -1758,7 +1760,7 @@ class Safari(Browser):
path = None
if channel == "preview":
path = "/Applications/Safari Technology Preview.app/Contents/MacOS"
- return find_executable("safaridriver", path)
+ return which("safaridriver", path=path)
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
raise NotImplementedError
@@ -1835,15 +1837,15 @@ class Servo(Browser):
resp = self._get(channel)
decompress(resp.raw, dest=dest)
- path = find_executable("servo", os.path.join(dest, "servo"))
+ path = which("servo", path=os.path.join(dest, "servo"))
st = os.stat(path)
os.chmod(path, st.st_mode | stat.S_IEXEC)
return path
def find_binary(self, venv_path=None, channel=None):
- path = find_executable("servo", os.path.join(venv_path, "servo"))
+ path = which("servo", path=os.path.join(venv_path, "servo"))
if path is None:
- path = find_executable("servo")
+ path = which("servo")
return path
def find_webdriver(self, venv_path=None, channel=None):
@@ -2010,7 +2012,7 @@ class WebKitTestRunner(Browser):
def find_binary(self, venv_path=None, channel="main"):
path = self._get_browser_binary_dir(venv_path, channel)
- return find_executable("WebKitTestRunner", os.path.join(path, "Release"))
+ return which("WebKitTestRunner", path=os.path.join(path, "Release"))
def find_webdriver(self, venv_path=None, channel="main"):
return None
@@ -2026,8 +2028,6 @@ class WebKitTestRunner(Browser):
class WebKitGTKMiniBrowser(WebKit):
-
-
def _get_osidversion(self):
with open('/etc/os-release') as osrelease_handle:
for line in osrelease_handle.readlines():
@@ -2035,11 +2035,11 @@ class WebKitGTKMiniBrowser(WebKit):
os_id = line.split('=')[1].strip().strip('"')
if line.startswith('VERSION_ID='):
version_id = line.split('=')[1].strip().strip('"')
- assert(os_id)
- assert(version_id)
+ assert os_id
+ assert version_id
osidversion = os_id + '-' + version_id
- assert(' ' not in osidversion)
- assert(len(osidversion) > 3)
+ assert ' ' not in osidversion
+ assert len(osidversion) > 3
return osidversion.capitalize()
@@ -2113,10 +2113,9 @@ class WebKitGTKMiniBrowser(WebKit):
bundle_dir = os.path.join(venv_base_path, "webkitgtk_minibrowser")
install_ok_file = os.path.join(bundle_dir, ".installation-ok")
if os.path.isfile(install_ok_file):
- return find_executable(binary, bundle_dir)
+ return which(binary, path=bundle_dir)
return None
-
def find_binary(self, venv_path=None, channel=None):
minibrowser_path = self._find_executable_in_channel_bundle("MiniBrowser", venv_path, channel)
if minibrowser_path:
@@ -2125,7 +2124,7 @@ class WebKitGTKMiniBrowser(WebKit):
libexecpaths = ["/usr/libexec/webkit2gtk-4.0"] # Fedora path
triplet = "x86_64-linux-gnu"
# Try to use GCC to detect this machine triplet
- gcc = find_executable("gcc")
+ gcc = which("gcc")
if gcc:
try:
triplet = call(gcc, "-dumpmachine").strip()
@@ -2133,12 +2132,12 @@ class WebKitGTKMiniBrowser(WebKit):
pass
# Add Debian/Ubuntu path
libexecpaths.append("/usr/lib/%s/webkit2gtk-4.0" % triplet)
- return find_executable("MiniBrowser", os.pathsep.join(libexecpaths))
+ return which("MiniBrowser", path=os.pathsep.join(libexecpaths))
def find_webdriver(self, venv_path=None, channel=None):
webdriver_path = self._find_executable_in_channel_bundle("WebKitWebDriver", venv_path, channel)
if not webdriver_path:
- webdriver_path = find_executable("WebKitWebDriver")
+ webdriver_path = which("WebKitWebDriver")
return webdriver_path
def version(self, binary=None, webdriver_binary=None):
@@ -2171,10 +2170,10 @@ class Epiphany(Browser):
raise NotImplementedError
def find_binary(self, venv_path=None, channel=None):
- return find_executable("epiphany")
+ return which("epiphany")
def find_webdriver(self, venv_path=None, channel=None):
- return find_executable("WebKitWebDriver")
+ return which("WebKitWebDriver")
def install_webdriver(self, dest=None, channel=None, browser_binary=None):
raise NotImplementedError
diff --git a/tests/wpt/web-platform-tests/tools/wpt/requirements.txt b/tests/wpt/web-platform-tests/tools/wpt/requirements.txt
index 496696730aa..becc27ff2e0 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/requirements.txt
+++ b/tests/wpt/web-platform-tests/tools/wpt/requirements.txt
@@ -1 +1 @@
-requests==2.29.0
+requests==2.30.0
diff --git a/tests/wpt/web-platform-tests/tools/wpt/requirements_install.txt b/tests/wpt/web-platform-tests/tools/wpt/requirements_install.txt
index 5db7bce788c..a299792b223 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/requirements_install.txt
+++ b/tests/wpt/web-platform-tests/tools/wpt/requirements_install.txt
@@ -1 +1,2 @@
mozinstall==2.0.1
+packaging==23.1
diff --git a/tests/wpt/web-platform-tests/tools/wpt/run.py b/tests/wpt/web-platform-tests/tools/wpt/run.py
index 72ceab08b97..9a1111c59f6 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/run.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/run.py
@@ -4,7 +4,7 @@ import argparse
import os
import platform
import sys
-from distutils.spawn import find_executable
+from shutil import which
from typing import ClassVar, Tuple, Type
wpt_root = os.path.abspath(os.path.join(os.path.dirname(__file__), os.pardir, os.pardir))
@@ -92,7 +92,7 @@ def args_general(kwargs):
if kwargs["host_cert_path"] is None:
kwargs["host_cert_path"] = os.path.join(cert_root, "web-platform.test.pem")
elif kwargs["ssl_type"] == "openssl":
- if not find_executable(kwargs["openssl_binary"]):
+ if not which(kwargs["openssl_binary"]):
if os.uname()[0] == "Windows":
raise WptrunError("""OpenSSL binary not found. If you need HTTPS tests, install OpenSSL from
@@ -158,8 +158,8 @@ in PowerShell with Administrator privileges.""" % (wpt_path, hosts_path)
class BrowserSetup:
- name = None # type: ClassVar[str]
- browser_cls = None # type: ClassVar[Type[browser.Browser]]
+ name: ClassVar[str]
+ browser_cls: ClassVar[Type[browser.Browser]]
def __init__(self, venv, prompt=True):
self.browser = self.browser_cls(logger)
@@ -335,8 +335,8 @@ class FirefoxAndroid(BrowserSetup):
class Chrome(BrowserSetup):
name = "chrome"
- browser_cls = browser.Chrome # type: ClassVar[Type[browser.ChromeChromiumBase]]
- experimental_channels = ("dev", "canary", "nightly") # type: ClassVar[Tuple[str, ...]]
+ browser_cls: ClassVar[Type[browser.ChromeChromiumBase]] = browser.Chrome
+ experimental_channels: ClassVar[Tuple[str, ...]] = ("dev", "canary", "nightly")
def setup_kwargs(self, kwargs):
browser_channel = kwargs["browser_channel"]
@@ -429,7 +429,7 @@ class ContentShell(BrowserSetup):
class Chromium(Chrome):
name = "chromium"
- browser_cls = browser.Chromium # type: ClassVar[Type[browser.ChromeChromiumBase]]
+ browser_cls: ClassVar[Type[browser.ChromeChromiumBase]] = browser.Chromium
experimental_channels = ("nightly",)
diff --git a/tests/wpt/web-platform-tests/tools/wpt/testfiles.py b/tests/wpt/web-platform-tests/tools/wpt/testfiles.py
index 74c97ceefe2..e13b878cf2a 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/testfiles.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/testfiles.py
@@ -16,24 +16,12 @@ except ValueError:
# reference
#
# note we need both because depending on caller we may/may not have the
- # paths set up correctly to handle both and MYPY has no knowledge of our
+ # paths set up correctly to handle both and mypy has no knowledge of our
# sys.path magic
from manifest import manifest # type: ignore
from manifest.utils import git as get_git_cmd # type: ignore
-MYPY = False
-if MYPY:
- # MYPY is set to True when run under Mypy.
- from typing import Any
- from typing import Dict
- from typing import Iterable
- from typing import List
- from typing import Optional
- from typing import Pattern
- from typing import Sequence
- from typing import Set
- from typing import Text
- from typing import Tuple
+from typing import Any, Dict, Iterable, List, Optional, Pattern, Sequence, Set, Text, Tuple
DEFAULT_IGNORE_RULES = ("resources/testharness*", "resources/testdriver*")
@@ -43,13 +31,11 @@ wpt_root = os.path.abspath(os.path.join(here, os.pardir, os.pardir))
logger = logging.getLogger()
-def display_branch_point():
- # type: () -> None
+def display_branch_point() -> None:
print(branch_point())
-def branch_point():
- # type: () -> Optional[Text]
+def branch_point() -> Optional[Text]:
git = get_git_cmd(wpt_root)
if git is None:
raise Exception("git not found")
@@ -62,7 +48,7 @@ def branch_point():
# This is a PR, so the base branch is in GITHUB_BRANCH
base_branch = os.environ.get("GITHUB_BRANCH")
assert base_branch, "GITHUB_BRANCH environment variable is defined"
- branch_point = git("merge-base", "HEAD", base_branch) # type: Optional[Text]
+ branch_point: Optional[Text] = git("merge-base", "HEAD", base_branch)
else:
# Otherwise we aren't on a PR, so we try to find commits that are only in the
# current branch c.f.
@@ -87,7 +73,7 @@ def branch_point():
cmd,
commits_bytes)
- commit_parents = OrderedDict() # type: Dict[Text, List[Text]]
+ commit_parents: Dict[Text, List[Text]] = OrderedDict()
commits = commits_bytes.decode("ascii")
if commits:
for line in commits.split("\n"):
@@ -133,8 +119,7 @@ def branch_point():
return branch_point
-def compile_ignore_rule(rule):
- # type: (Text) -> Pattern[Text]
+def compile_ignore_rule(rule: Text) -> Pattern[Text]:
rule = rule.replace(os.path.sep, "/")
parts = rule.split("/")
re_parts = []
@@ -148,8 +133,7 @@ def compile_ignore_rule(rule):
return re.compile("^%s$" % "/".join(re_parts))
-def repo_files_changed(revish, include_uncommitted=False, include_new=False):
- # type: (Text, bool, bool) -> Set[Text]
+def repo_files_changed(revish: Text, include_uncommitted: bool = False, include_new: bool = False) -> Set[Text]:
git = get_git_cmd(wpt_root)
if git is None:
raise Exception("git not found")
@@ -186,8 +170,7 @@ def repo_files_changed(revish, include_uncommitted=False, include_new=False):
return files
-def exclude_ignored(files, ignore_rules):
- # type: (Iterable[Text], Optional[Sequence[Text]]) -> Tuple[List[Text], List[Text]]
+def exclude_ignored(files: Iterable[Text], ignore_rules: Optional[Sequence[Text]]) -> Tuple[List[Text], List[Text]]:
if ignore_rules is None:
ignore_rules = DEFAULT_IGNORE_RULES
compiled_ignore_rules = [compile_ignore_rule(item) for item in set(ignore_rules)]
@@ -207,12 +190,11 @@ def exclude_ignored(files, ignore_rules):
return changed, ignored
-def files_changed(revish, # type: Text
- ignore_rules=None, # type: Optional[Sequence[Text]]
- include_uncommitted=False, # type: bool
- include_new=False # type: bool
- ):
- # type: (...) -> Tuple[List[Text], List[Text]]
+def files_changed(revish: Text,
+ ignore_rules: Optional[Sequence[Text]] = None,
+ include_uncommitted: bool = False,
+ include_new: bool = False
+ ) -> Tuple[List[Text], List[Text]]:
"""Find files changed in certain revisions.
The function passes `revish` directly to `git diff`, so `revish` can have a
@@ -228,27 +210,24 @@ def files_changed(revish, # type: Text
return exclude_ignored(files, ignore_rules)
-def _in_repo_root(full_path):
- # type: (Text) -> bool
+def _in_repo_root(full_path: Text) -> bool:
rel_path = os.path.relpath(full_path, wpt_root)
path_components = rel_path.split(os.sep)
return len(path_components) < 2
-def load_manifest(manifest_path=None, manifest_update=True):
- # type: (Optional[Text], bool) -> manifest.Manifest
+def load_manifest(manifest_path: Optional[Text] = None, manifest_update: bool = True) -> manifest.Manifest:
if manifest_path is None:
manifest_path = os.path.join(wpt_root, "MANIFEST.json")
return manifest.load_and_update(wpt_root, manifest_path, "/",
update=manifest_update)
-def affected_testfiles(files_changed, # type: Iterable[Text]
- skip_dirs=None, # type: Optional[Set[Text]]
- manifest_path=None, # type: Optional[Text]
- manifest_update=True # type: bool
- ):
- # type: (...) -> Tuple[Set[Text], Set[Text]]
+def affected_testfiles(files_changed: Iterable[Text],
+ skip_dirs: Optional[Set[Text]] = None,
+ manifest_path: Optional[Text] = None,
+ manifest_update: bool = True
+ ) -> Tuple[Set[Text], Set[Text]]:
"""Determine and return list of test files that reference changed files."""
if skip_dirs is None:
skip_dirs = {"conformance-checkers", "docs", "tools"}
@@ -277,7 +256,7 @@ def affected_testfiles(files_changed, # type: Iterable[Text]
tests_changed = {item for item in files_changed if item in test_files}
nontest_changed_paths = set()
- rewrites = {"/resources/webidl2/lib/webidl2.js": "/resources/WebIDLParser.js"} # type: Dict[Text, Text]
+ rewrites: Dict[Text, Text] = {"/resources/webidl2/lib/webidl2.js": "/resources/WebIDLParser.js"}
for full_path in nontests_changed:
rel_path = os.path.relpath(full_path, wpt_root)
path_components = rel_path.split(os.sep)
@@ -293,8 +272,7 @@ def affected_testfiles(files_changed, # type: Iterable[Text]
interfaces_changed_names = [os.path.splitext(os.path.basename(interface))[0]
for interface in interfaces_changed]
- def affected_by_wdspec(test):
- # type: (Text) -> bool
+ def affected_by_wdspec(test: Text) -> bool:
affected = False
if test in wdspec_test_files:
for support_full_path, _ in nontest_changed_paths:
@@ -309,8 +287,7 @@ def affected_testfiles(files_changed, # type: Iterable[Text]
break
return affected
- def affected_by_interfaces(file_contents):
- # type: (Text) -> bool
+ def affected_by_interfaces(file_contents: Text) -> bool:
if len(interfaces_changed_names) > 0:
if 'idlharness.js' in file_contents:
for interface in interfaces_changed_names:
@@ -335,9 +312,9 @@ def affected_testfiles(files_changed, # type: Iterable[Text]
continue
with open(test_full_path, "rb") as fh:
- raw_file_contents = fh.read() # type: bytes
+ raw_file_contents: bytes = fh.read()
if raw_file_contents.startswith(b"\xfe\xff"):
- file_contents = raw_file_contents.decode("utf-16be", "replace") # type: Text
+ file_contents: Text = raw_file_contents.decode("utf-16be", "replace")
elif raw_file_contents.startswith(b"\xff\xfe"):
file_contents = raw_file_contents.decode("utf-16le", "replace")
else:
@@ -351,8 +328,7 @@ def affected_testfiles(files_changed, # type: Iterable[Text]
return tests_changed, affected_testfiles
-def get_parser():
- # type: () -> argparse.ArgumentParser
+def get_parser() -> argparse.ArgumentParser:
parser = argparse.ArgumentParser()
parser.add_argument("revish", default=None, help="Commits to consider. Defaults to the "
"commits on the current branch", nargs="?")
@@ -375,8 +351,7 @@ def get_parser():
return parser
-def get_parser_affected():
- # type: () -> argparse.ArgumentParser
+def get_parser_affected() -> argparse.ArgumentParser:
parser = get_parser()
parser.add_argument("--metadata",
dest="metadata_root",
@@ -386,16 +361,14 @@ def get_parser_affected():
return parser
-def get_revish(**kwargs):
- # type: (**Any) -> Text
+def get_revish(**kwargs: Any) -> Text:
revish = kwargs.get("revish")
if revish is None:
revish = "%s..HEAD" % branch_point()
return revish.strip()
-def run_changed_files(**kwargs):
- # type: (**Any) -> None
+def run_changed_files(**kwargs: Any) -> None:
revish = get_revish(**kwargs)
changed, _ = files_changed(revish,
kwargs["ignore_rule"],
@@ -409,8 +382,7 @@ def run_changed_files(**kwargs):
sys.stdout.write(line)
-def run_tests_affected(**kwargs):
- # type: (**Any) -> None
+def run_tests_affected(**kwargs: Any) -> None:
revish = get_revish(**kwargs)
changed, _ = files_changed(revish,
kwargs["ignore_rule"],
diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_browser.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_browser.py
index d1d31e50991..b317925ba00 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_browser.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_browser.py
@@ -351,36 +351,37 @@ def test_webkitgtk_minibrowser_version_errors(mocked_check_output):
assert webkitgtk_minibrowser.version(binary='MiniBrowser') is None
-# The test below doesn't work on Windows because distutils find_binary()
+# The test below doesn't work on Windows because find_binary()
# on Windows only works if the binary name ends with a ".exe" suffix.
# But, WebKitGTK itself doesn't support Windows, so lets skip the test.
@pytest.mark.skipif(sys.platform.startswith('win'), reason='test not needed on Windows')
-@mock.patch('os.path.isfile')
-def test_webkitgtk_minibrowser_find_binary(mocked_os_path_isfile):
+@mock.patch('os.access', return_value=True)
+@mock.patch('os.path.exists')
+def test_webkitgtk_minibrowser_find_binary(mocked_os_path_exists, _mocked_os_access):
webkitgtk_minibrowser = browser.WebKitGTKMiniBrowser(logger)
# No MiniBrowser found
- mocked_os_path_isfile.side_effect = lambda path: path == '/etc/passwd'
+ mocked_os_path_exists.side_effect = lambda path: path == '/etc/passwd'
assert webkitgtk_minibrowser.find_binary() is None
# Found on the default Fedora path
fedora_minibrowser_path = '/usr/libexec/webkit2gtk-4.0/MiniBrowser'
- mocked_os_path_isfile.side_effect = lambda path: path == fedora_minibrowser_path
+ mocked_os_path_exists.side_effect = lambda path: path == fedora_minibrowser_path
assert webkitgtk_minibrowser.find_binary() == fedora_minibrowser_path
# Found on the default Debian path for AMD64 (gcc not available)
debian_minibrowser_path_amd64 = '/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser'
- mocked_os_path_isfile.side_effect = lambda path: path == debian_minibrowser_path_amd64
+ mocked_os_path_exists.side_effect = lambda path: path == debian_minibrowser_path_amd64
assert webkitgtk_minibrowser.find_binary() == debian_minibrowser_path_amd64
# Found on the default Debian path for AMD64 (gcc available but gives an error)
debian_minibrowser_path_amd64 = '/usr/lib/x86_64-linux-gnu/webkit2gtk-4.0/MiniBrowser'
- mocked_os_path_isfile.side_effect = lambda path: path in [debian_minibrowser_path_amd64, '/usr/bin/gcc']
+ mocked_os_path_exists.side_effect = lambda path: path in [debian_minibrowser_path_amd64, '/usr/bin/gcc']
with mock.patch('subprocess.check_output', return_value = b'error', side_effect = subprocess.CalledProcessError(1, 'cmd')):
assert webkitgtk_minibrowser.find_binary() == debian_minibrowser_path_amd64
# Found on the default Debian path for ARM64 (gcc available)
debian_minibrowser_path_arm64 = '/usr/lib/aarch64-linux-gnu/webkit2gtk-4.0/MiniBrowser'
- mocked_os_path_isfile.side_effect = lambda path: path in [debian_minibrowser_path_arm64, '/usr/bin/gcc']
+ mocked_os_path_exists.side_effect = lambda path: path in [debian_minibrowser_path_arm64, '/usr/bin/gcc']
with mock.patch('subprocess.check_output', return_value = b'aarch64-linux-gnu'):
assert webkitgtk_minibrowser.find_binary() == debian_minibrowser_path_arm64
diff --git a/tests/wpt/web-platform-tests/tools/wpt/tests/test_install.py b/tests/wpt/web-platform-tests/tools/wpt/tests/test_install.py
index 076db33e812..6726081746c 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/tests/test_install.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/tests/test_install.py
@@ -51,14 +51,17 @@ def test_install_chrome_chromedriver_by_version():
if sys.platform == "win32":
dest = os.path.join(wpt.localpaths.repo_root, wpt.venv_dir(), "Scripts")
chromedriver_path = os.path.join(dest, "chrome", "chromedriver.exe")
+ # By default Windows treats paths as case-insensitive
+ path_fn = lambda path: path.lower()
else:
dest = os.path.join(wpt.localpaths.repo_root, wpt.venv_dir(), "bin")
chromedriver_path = os.path.join(dest, "chrome", "chromedriver")
+ path_fn = lambda path: path
if os.path.exists(chromedriver_path):
os.unlink(chromedriver_path)
# This is a stable version.
binary_path = chrome.install_webdriver_by_version(dest=dest, version="111.0.5563.146")
- assert binary_path == chromedriver_path
+ assert path_fn(binary_path) == path_fn(chromedriver_path)
assert os.path.exists(chromedriver_path)
os.unlink(chromedriver_path)
diff --git a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py
index 05ca52244c5..7176bafcde4 100644
--- a/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py
+++ b/tests/wpt/web-platform-tests/tools/wpt/virtualenv.py
@@ -4,7 +4,7 @@ import os
import shutil
import sys
import logging
-from distutils.spawn import find_executable
+from shutil import which
# The `pkg_resources` module is provided by `setuptools`, which is itself a
# dependency of `virtualenv`. Tolerate its absence so that this module may be
@@ -27,7 +27,7 @@ class Virtualenv:
self.path = path
self.skip_virtualenv_setup = skip_virtualenv_setup
if not skip_virtualenv_setup:
- self.virtualenv = find_executable("virtualenv")
+ self.virtualenv = which("virtualenv")
if not self.virtualenv:
raise ValueError("virtualenv must be installed and on the PATH")
self._working_set = None
@@ -57,7 +57,7 @@ class Virtualenv:
@property
def pip_path(self):
- path = find_executable("pip3", self.bin_path)
+ path = which("pip3", path=self.bin_path)
if path is None:
raise ValueError("pip3 not found")
return path
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt
index c55bc634101..abe5966197d 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements.txt
@@ -3,7 +3,8 @@ mozdebug==0.3.0
mozinfo==1.2.2 # https://bugzilla.mozilla.org/show_bug.cgi?id=1621226
mozlog==7.1.1
mozprocess==1.3.0
+packaging==23.1
pillow==9.5.0
-requests==2.29.0
+requests==2.30.0
six==1.16.0
urllib3[secure]==1.26.15
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt
index 0650e6655e9..9dd3989e0d8 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/requirements_sauce.txt
@@ -1,2 +1,2 @@
selenium==4.9.0
-requests==2.29.0
+requests==2.30.0
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py
index 2bcffbb5de4..6946ccd4a6b 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/chrome.py
@@ -6,18 +6,20 @@ from .base import NullBrowser # noqa: F401
from .base import get_timeout_multiplier # noqa: F401
from .base import cmd_arg
from ..executors import executor_kwargs as base_executor_kwargs
-from ..executors.executorwebdriver import (WebDriverTestharnessExecutor, # noqa: F401
- WebDriverRefTestExecutor, # noqa: F401
- WebDriverCrashtestExecutor) # noqa: F401
+from ..executors.executorwebdriver import WebDriverCrashtestExecutor # noqa: F401
from ..executors.base import WdspecExecutor # noqa: F401
-from ..executors.executorchrome import ChromeDriverPrintRefTestExecutor # noqa: F401
+from ..executors.executorchrome import ( # noqa: F401
+ ChromeDriverPrintRefTestExecutor,
+ ChromeDriverRefTestExecutor,
+ ChromeDriverTestharnessExecutor,
+)
__wptrunner__ = {"product": "chrome",
"check_args": "check_args",
"browser": "ChromeBrowser",
- "executor": {"testharness": "WebDriverTestharnessExecutor",
- "reftest": "WebDriverRefTestExecutor",
+ "executor": {"testharness": "ChromeDriverTestharnessExecutor",
+ "reftest": "ChromeDriverRefTestExecutor",
"print-reftest": "ChromeDriverPrintRefTestExecutor",
"wdspec": "WdspecExecutor",
"crashtest": "WebDriverCrashtestExecutor"},
@@ -28,6 +30,7 @@ __wptrunner__ = {"product": "chrome",
"update_properties": "update_properties",
"timeout_multiplier": "get_timeout_multiplier",}
+
def check_args(**kwargs):
require_arg(kwargs, "webdriver_binary")
@@ -40,10 +43,14 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs):
def executor_kwargs(logger, test_type, test_environment, run_info_data,
**kwargs):
+ sanitizer_enabled = kwargs.get("sanitizer_enabled")
+ if sanitizer_enabled:
+ test_type = "crashtest"
executor_kwargs = base_executor_kwargs(test_type, test_environment, run_info_data,
**kwargs)
executor_kwargs["close_after_done"] = True
executor_kwargs["supports_eager_pageload"] = False
+ executor_kwargs["sanitizer_enabled"] = sanitizer_enabled
capabilities = {
"goog:chromeOptions": {
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/content_shell.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/content_shell.py
index d729ebb6b36..04c0ca70c4c 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/content_shell.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/content_shell.py
@@ -63,8 +63,12 @@ def browser_kwargs(logger, test_type, run_info_data, config, **kwargs):
def executor_kwargs(logger, test_type, test_environment, run_info_data,
**kwargs):
+ sanitizer_enabled = kwargs.get("sanitizer_enabled")
+ if sanitizer_enabled:
+ test_type = "crashtest"
executor_kwargs = base_executor_kwargs(test_type, test_environment, run_info_data,
**kwargs)
+ executor_kwargs["sanitizer_enabled"] = sanitizer_enabled
return executor_kwargs
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py
index 3e4a6c8d4dc..f7dcd55d628 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/browsers/safari.py
@@ -2,8 +2,8 @@
import os
import plistlib
-from distutils.spawn import find_executable
-from distutils.version import LooseVersion
+from packaging.version import Version
+from shutil import which
import psutil
@@ -50,9 +50,9 @@ def executor_kwargs(logger, test_type, test_environment, run_info_data, **kwargs
if kwargs["binary"] is not None:
raise ValueError("Safari doesn't support setting executable location")
- V = LooseVersion
browser_bundle_version = run_info_data["browser_bundle_version"]
- if browser_bundle_version is not None and V(browser_bundle_version[2:]) >= V("613.1.7.1"):
+ if (browser_bundle_version is not None and
+ Version(browser_bundle_version[2:]) >= Version("613.1.7.1")):
logger.debug("using acceptInsecureCerts=True")
executor_kwargs["capabilities"]["acceptInsecureCerts"] = True
else:
@@ -161,7 +161,7 @@ class SafariBrowser(WebDriverBrowser):
env=env)
if "/" not in webdriver_binary:
- wd_path = find_executable(webdriver_binary)
+ wd_path = which(webdriver_binary)
else:
wd_path = webdriver_binary
self.safari_path = self._find_safari_executable(wd_path)
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py
index f62ded610ca..3159bb3c3a2 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/base.py
@@ -245,14 +245,14 @@ class TestExecutor:
"""
__metaclass__ = ABCMeta
- test_type = None # type: ClassVar[str]
+ test_type: ClassVar[str]
# convert_result is a class variable set to a callable converter
# (e.g. reftest_result_converter) converting from an instance of
# URLManifestItem (e.g. RefTest) + type-dependent results object +
# type-dependent extra data, returning a tuple of Result and list of
# SubtestResult. For now, any callable is accepted. TODO: Make this type
# stricter when more of the surrounding code is annotated.
- convert_result = None # type: ClassVar[Callable[..., Any]]
+ convert_result: ClassVar[Callable[..., Any]]
supports_testdriver = False
supports_jsshell = False
# Extra timeout to use after internal test timeout at which the harness
@@ -605,7 +605,7 @@ class RefTestImplementation:
class WdspecExecutor(TestExecutor):
convert_result = pytest_result_converter
- protocol_cls = WdspecProtocol # type: ClassVar[Type[Protocol]]
+ protocol_cls: ClassVar[Type[Protocol]] = WdspecProtocol
def __init__(self, logger, browser, server_config, webdriver_binary,
webdriver_args, timeout_multiplier=1, capabilities=None,
@@ -702,7 +702,7 @@ class CallbackHandler:
WebDriver. Things that are more different to WebDriver may need to create a
fully custom implementation."""
- unimplemented_exc = (NotImplementedError,) # type: ClassVar[Tuple[Type[Exception], ...]]
+ unimplemented_exc: ClassVar[Tuple[Type[Exception], ...]] = (NotImplementedError,)
def __init__(self, logger, protocol, test_window):
self.protocol = protocol
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorchrome.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorchrome.py
index 030578c7b93..a3a733efbd2 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorchrome.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorchrome.py
@@ -2,16 +2,69 @@
import os
import traceback
-
+from typing import Type
from urllib.parse import urljoin
-from .base import get_pages
-from .executorwebdriver import WebDriverProtocol, WebDriverRefTestExecutor, WebDriverRun
+from .base import (
+ CrashtestExecutor,
+ TestharnessExecutor,
+ get_pages,
+)
+from .executorwebdriver import (
+ WebDriverCrashtestExecutor,
+ WebDriverProtocol,
+ WebDriverRefTestExecutor,
+ WebDriverRun,
+ WebDriverTestharnessExecutor,
+)
from .protocol import PrintProtocolPart
here = os.path.dirname(__file__)
+def make_sanitizer_mixin(crashtest_executor_cls: Type[CrashtestExecutor]): # type: ignore[no-untyped-def]
+ class SanitizerMixin:
+ def __new__(cls, logger, browser, **kwargs):
+ # Overriding `__new__` is the least worst way we can force tests to run
+ # as crashtests at runtime while still supporting:
+ # * Class attributes (e.g., `extra_timeout`)
+ # * Pickleability for `multiprocessing` transport
+ # * The `__wptrunner__` product interface
+ #
+ # These requirements rule out approaches with `functools.partial(...)`
+ # or global variables.
+ if kwargs.get("sanitizer_enabled"):
+ executor = crashtest_executor_cls(logger, browser, **kwargs)
+
+ def convert_from_crashtest_result(test, result):
+ if issubclass(cls, TestharnessExecutor):
+ status = result["status"]
+ if status == "PASS":
+ status = "OK"
+ harness_result = test.result_cls(status, result["message"])
+ # Don't report subtests.
+ return harness_result, []
+ # `crashtest` statuses are a subset of `(print-)reftest`
+ # ones, so no extra conversion necessary.
+ return cls.convert_result(executor, test, result)
+
+ executor.convert_result = convert_from_crashtest_result
+ return executor
+ return super().__new__(cls)
+ return SanitizerMixin
+
+
+_SanitizerMixin = make_sanitizer_mixin(WebDriverCrashtestExecutor)
+
+
+class ChromeDriverRefTestExecutor(WebDriverRefTestExecutor, _SanitizerMixin): # type: ignore
+ pass
+
+
+class ChromeDriverTestharnessExecutor(WebDriverTestharnessExecutor, _SanitizerMixin): # type: ignore
+ pass
+
+
class ChromeDriverPrintProtocolPart(PrintProtocolPart):
def setup(self):
self.webdriver = self.parent.webdriver
@@ -67,7 +120,7 @@ class ChromeDriverProtocol(WebDriverProtocol):
implements = WebDriverProtocol.implements + [ChromeDriverPrintProtocolPart]
-class ChromeDriverPrintRefTestExecutor(WebDriverRefTestExecutor):
+class ChromeDriverPrintRefTestExecutor(ChromeDriverRefTestExecutor):
protocol_cls = ChromeDriverProtocol
def setup(self, runner):
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorcontentshell.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorcontentshell.py
index e00f25b0038..d558ce07f4a 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorcontentshell.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/executorcontentshell.py
@@ -1,6 +1,7 @@
# mypy: allow-untyped-defs
from .base import RefTestExecutor, RefTestImplementation, CrashtestExecutor, TestharnessExecutor
+from .executorchrome import make_sanitizer_mixin
from .protocol import Protocol, ProtocolPart
from time import time
from queue import Empty
@@ -188,7 +189,25 @@ def _convert_exception(test, exception, errors):
raise exception
-class ContentShellRefTestExecutor(RefTestExecutor):
+class ContentShellCrashtestExecutor(CrashtestExecutor):
+ def __init__(self, logger, browser, server_config, timeout_multiplier=1, debug_info=None,
+ **kwargs):
+ super().__init__(logger, browser, server_config, timeout_multiplier, debug_info, **kwargs)
+ self.protocol = ContentShellProtocol(self, browser)
+
+ def do_test(self, test):
+ try:
+ _ = self.protocol.content_shell_test.do_test(self.test_url(test), test.timeout * self.timeout_multiplier)
+ self.protocol.content_shell_errors.read_errors()
+ return self.convert_result(test, {"status": "PASS", "message": None})
+ except BaseException as exception:
+ return _convert_exception(test, exception, self.protocol.content_shell_errors.read_errors())
+
+
+_SanitizerMixin = make_sanitizer_mixin(ContentShellCrashtestExecutor)
+
+
+class ContentShellRefTestExecutor(RefTestExecutor, _SanitizerMixin): # type: ignore
def __init__(self, logger, browser, server_config, timeout_multiplier=1, screenshot_cache=None,
debug_info=None, reftest_screenshot="unexpected", **kwargs):
super().__init__(logger, browser, server_config, timeout_multiplier, screenshot_cache,
@@ -234,22 +253,7 @@ class ContentShellPrintRefTestExecutor(ContentShellRefTestExecutor):
is_print = True
-class ContentShellCrashtestExecutor(CrashtestExecutor):
- def __init__(self, logger, browser, server_config, timeout_multiplier=1, debug_info=None,
- **kwargs):
- super().__init__(logger, browser, server_config, timeout_multiplier, debug_info, **kwargs)
- self.protocol = ContentShellProtocol(self, browser)
-
- def do_test(self, test):
- try:
- _ = self.protocol.content_shell_test.do_test(self.test_url(test), test.timeout * self.timeout_multiplier)
- self.protocol.content_shell_errors.read_errors()
- return self.convert_result(test, {"status": "PASS", "message": None})
- except BaseException as exception:
- return _convert_exception(test, exception, self.protocol.content_shell_errors.read_errors())
-
-
-class ContentShellTestharnessExecutor(TestharnessExecutor):
+class ContentShellTestharnessExecutor(TestharnessExecutor, _SanitizerMixin): # type: ignore
def __init__(self, logger, browser, server_config, timeout_multiplier=1, debug_info=None,
**kwargs):
super().__init__(logger, browser, server_config, timeout_multiplier, debug_info, **kwargs)
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py
index af64cc855e2..4cef0134027 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/executors/protocol.py
@@ -32,7 +32,7 @@ class Protocol:
:param Browser browser: The Browser using this protocol"""
__metaclass__ = ABCMeta
- implements = [] # type: ClassVar[List[Type[ProtocolPart]]]
+ implements: ClassVar[List[Type["ProtocolPart"]]] = []
def __init__(self, executor, browser):
self.executor = executor
@@ -98,7 +98,7 @@ class ProtocolPart:
:param Protocol parent: The parent protocol"""
__metaclass__ = ABCMeta
- name = None # type: ClassVar[str]
+ name: ClassVar[str]
def __init__(self, parent):
self.parent = parent
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py
index 0bc25187976..0088971795e 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/manifestupdate.py
@@ -4,7 +4,7 @@ import os
from urllib.parse import urljoin, urlsplit
from collections import namedtuple, defaultdict, deque
from math import ceil
-from typing import Any, Callable, ClassVar, Dict, List
+from typing import Any, Callable, ClassVar, Dict, List, Optional
from .wptmanifest import serialize
from .wptmanifest.node import (DataNode, ConditionalNode, BinaryExpressionNode,
@@ -336,13 +336,13 @@ def build_unconditional_tree(_, run_info_properties, results):
class PropertyUpdate:
- property_name = None # type: ClassVar[str]
- cls_default_value = None # type: ClassVar[Any]
- value_type = None # type: ClassVar[type]
+ property_name: ClassVar[str]
+ cls_default_value: ClassVar[Optional[Any]] = None
+ value_type: ClassVar[Optional[type]] = None
# property_builder is a class variable set to either build_conditional_tree
# or build_unconditional_tree. TODO: Make this type stricter when those
# methods are annotated.
- property_builder = None # type: ClassVar[Callable[..., Any]]
+ property_builder: ClassVar[Callable[..., Any]]
def __init__(self, node):
self.node = node
@@ -784,7 +784,7 @@ class MinAssertsUpdate(PropertyUpdate):
class AppendOnlyListUpdate(PropertyUpdate):
- cls_default_value = [] # type: ClassVar[List[str]]
+ cls_default_value: ClassVar[List[str]] = []
property_builder = build_unconditional_tree
def updated_value(self, current, new):
@@ -837,7 +837,7 @@ class LeakObjectUpdate(AppendOnlyListUpdate):
class LeakThresholdUpdate(PropertyUpdate):
property_name = "leak-threshold"
- cls_default_value = {} # type: ClassVar[Dict[str, int]]
+ cls_default_value: ClassVar[Dict[str, int]] = {}
property_builder = build_unconditional_tree
def from_result_value(self, result):
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_webkitgtk.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_webkitgtk.py
index 370cd862934..5b751e94562 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_webkitgtk.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/tests/browsers/test_webkitgtk.py
@@ -62,13 +62,13 @@ def test_webkitgtk_certificate_domain_list(product):
MockEnvironment(env_config),
{},
**kwargs)
- assert('capabilities' in executor_args)
- assert('webkitgtk:browserOptions' in executor_args['capabilities'])
- assert('certificates' in executor_args['capabilities']['webkitgtk:browserOptions'])
+ assert 'capabilities' in executor_args
+ assert 'webkitgtk:browserOptions' in executor_args['capabilities']
+ assert 'certificates' in executor_args['capabilities']['webkitgtk:browserOptions']
cert_list = executor_args['capabilities']['webkitgtk:browserOptions']['certificates']
for valid_domain in valid_domains_test:
- assert(domain_is_inside_certificate_list_cert(valid_domain, cert_list, cert_file))
- assert(not domain_is_inside_certificate_list_cert(valid_domain, cert_list, cert_file + ".backup_non_existent"))
+ assert domain_is_inside_certificate_list_cert(valid_domain, cert_list, cert_file)
+ assert not domain_is_inside_certificate_list_cert(valid_domain, cert_list, cert_file + ".backup_non_existent")
for invalid_domain in invalid_domains_test:
- assert(not domain_is_inside_certificate_list_cert(invalid_domain, cert_list, cert_file))
- assert(not domain_is_inside_certificate_list_cert(invalid_domain, cert_list, cert_file + ".backup_non_existent"))
+ assert not domain_is_inside_certificate_list_cert(invalid_domain, cert_list, cert_file)
+ assert not domain_is_inside_certificate_list_cert(invalid_domain, cert_list, cert_file + ".backup_non_existent")
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/base.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/base.py
index bd39e23b867..22ccde746fa 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/base.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/update/base.py
@@ -7,7 +7,7 @@ exit_clean = object()
class Step:
- provides = [] # type: ClassVar[List[str]]
+ provides: ClassVar[List[str]] = []
def __init__(self, logger):
self.logger = logger
@@ -49,7 +49,7 @@ class Step:
class StepRunner:
- steps = [] # type: ClassVar[List[Type[Step]]]
+ steps: ClassVar[List[Type[Step]]] = []
def __init__(self, logger, state):
"""Class that runs a specified series of Steps with a common State"""
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
index f64d17483d1..416e75b417f 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptcommandline.py
@@ -4,7 +4,7 @@ import argparse
import os
import sys
from collections import OrderedDict
-from distutils.spawn import find_executable
+from shutil import which
from datetime import timedelta
from . import config
@@ -362,6 +362,11 @@ scheme host and port.""")
chrome_group.add_argument("--no-enable-experimental", action="store_false", dest="enable_experimental",
help="Do not enable --enable-experimental-web-platform-features flag "
"on experimental channels")
+ chrome_group.add_argument(
+ "--enable-sanitizer",
+ action="store_true",
+ dest="sanitizer_enabled",
+ help="Only alert on sanitizer-related errors and crashes.")
sauce_group = parser.add_argument_group("Sauce Labs-specific")
sauce_group.add_argument("--sauce-browser", dest="sauce_browser",
@@ -502,7 +507,7 @@ def exe_path(name):
if name is None:
return
- path = find_executable(name)
+ path = which(name)
if path and os.access(path, os.X_OK):
return path
else:
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py
index 7d4f257f1ad..695d6a3dcc4 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wptmanifest/backends/conditional.py
@@ -33,7 +33,7 @@ class ConditionalValue:
if isinstance(self.value_node, ValueNode):
self.value_node.data = value
else:
- assert(isinstance(self.value_node, ListNode))
+ assert isinstance(self.value_node, ListNode)
while self.value_node.children:
self.value_node.children[0].remove()
assert len(self.value_node.children) == 0
diff --git a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
index 65577c1eabc..492549d4e7f 100644
--- a/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
+++ b/tests/wpt/web-platform-tests/tools/wptrunner/wptrunner/wpttest.py
@@ -1,10 +1,10 @@
# mypy: allow-untyped-defs
-
import os
import subprocess
import sys
+from abc import ABC
from collections import defaultdict
-from typing import Any, ClassVar, Dict, Type
+from typing import Any, ClassVar, Dict, Optional, Type
from urllib.parse import urljoin
from .wptmanifest.parser import atoms
@@ -13,7 +13,7 @@ atom_reset = atoms["Reset"]
enabled_tests = {"testharness", "reftest", "wdspec", "crashtest", "print-reftest"}
-class Result:
+class Result(ABC):
def __init__(self,
status,
message,
@@ -34,7 +34,7 @@ class Result:
return f"<{self.__module__}.{self.__class__.__name__} {self.status}>"
-class SubtestResult:
+class SubtestResult(ABC):
def __init__(self, name, status, message, stack=None, expected=None, known_intermittent=None):
self.name = name
if status not in self.statuses:
@@ -203,11 +203,10 @@ def server_protocol(manifest_item):
return "http"
-class Test:
-
- result_cls = None # type: ClassVar[Type[Result]]
- subtest_result_cls = None # type: ClassVar[Type[SubtestResult]]
- test_type = None # type: ClassVar[str]
+class Test(ABC):
+ result_cls: ClassVar[Type[Result]]
+ subtest_result_cls: ClassVar[Optional[Type[SubtestResult]]] = None
+ test_type: ClassVar[str]
pac = None
default_timeout = 10 # seconds
@@ -484,14 +483,6 @@ class TestharnessTest(Test):
return self.url
-class ManualTest(Test):
- test_type = "manual"
-
- @property
- def id(self):
- return self.url
-
-
class ReftestTest(Test):
"""A reftest
@@ -704,7 +695,6 @@ class CrashTest(Test):
manifest_test_cls = {"reftest": ReftestTest,
"print-reftest": PrintReftestTest,
"testharness": TestharnessTest,
- "manual": ManualTest,
"wdspec": WdspecTest,
"crashtest": CrashTest}
diff --git a/tests/wpt/web-platform-tests/tools/wptserve/tests/test_config.py b/tests/wpt/web-platform-tests/tools/wptserve/tests/test_config.py
index 9f84577c7fa..c761b681552 100644
--- a/tests/wpt/web-platform-tests/tools/wptserve/tests/test_config.py
+++ b/tests/wpt/web-platform-tests/tools/wptserve/tests/test_config.py
@@ -1,9 +1,8 @@
import json
import logging
import pickle
-
-from distutils.spawn import find_executable
from logging import handlers
+from shutil import which
import pytest
@@ -180,7 +179,7 @@ def test_ports_no_ssl():
assert ports["ws"] == [1003]
-@pytest.mark.skipif(find_executable("openssl") is None,
+@pytest.mark.skipif(which("openssl") is None,
reason="requires OpenSSL")
def test_ports_openssl():
with config.ConfigBuilder(logger,
diff --git a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py
index a9a85a136bd..84b17c12285 100644
--- a/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py
+++ b/tests/wpt/web-platform-tests/tools/wptserve/wptserve/pipes.py
@@ -21,7 +21,7 @@ def resolve_content(response):
class Pipeline:
- pipes = {} # type: ClassVar[Dict[str, Callable[..., Any]]]
+ pipes: ClassVar[Dict[str, Callable[..., Any]]] = {}
def __init__(self, pipe_string):
self.pipe_functions = self.parse(pipe_string)
diff --git a/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js b/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js
index 28ebbce5f13..f9c623b90b1 100644
--- a/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js
+++ b/tests/wpt/web-platform-tests/url/urlsearchparams-delete.any.js
@@ -61,3 +61,12 @@ test(() => {
assert_equals(url.pathname, 'space ');
assert_equals(url.href, 'data:space #test');
}, 'Changing the query of a URL with an opaque path can impact the path if the URL has no fragment');
+
+test(() => {
+ const params = new URLSearchParams();
+ params.append('a', 'b');
+ params.append('a', 'c');
+ params.append('a', 'd');
+ params.delete('a', 'c');
+ assert_equals(params.toString(), 'a=b&a=d');
+}, "Two-argument delete()");
diff --git a/tests/wpt/web-platform-tests/url/urlsearchparams-has.any.js b/tests/wpt/web-platform-tests/url/urlsearchparams-has.any.js
index 673dce77dc4..54cbf286db4 100644
--- a/tests/wpt/web-platform-tests/url/urlsearchparams-has.any.js
+++ b/tests/wpt/web-platform-tests/url/urlsearchparams-has.any.js
@@ -22,3 +22,16 @@ test(function() {
params.delete('first');
assert_false(params.has('first'), 'Search params object has no name "first"');
}, 'has() following delete()');
+
+test(() => {
+ const params = new URLSearchParams("a=b&a=d&c&e&");
+ assert_true(params.has('a', 'b'));
+ assert_false(params.has('a', 'c'));
+ assert_true(params.has('a', 'd'));
+ assert_true(params.has('e', ''));
+ params.append('first', null);
+ assert_false(params.has('first', ''));
+ assert_true(params.has('first', 'null'));
+ params.delete('a', 'b');
+ assert_true(params.has('a', 'd'));
+}, "Two-argument has()");
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/__init__.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/__init__.py
index 8a798f9dce2..f77345c1b73 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/__init__.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/__init__.py
@@ -88,7 +88,7 @@ def assert_javascript_entry(
}, entry)
-async def create_console_api_message_for_primitive_value(bidi_session, context, type, value):
+async def create_console_api_message_from_string(bidi_session, context, type, value):
await bidi_session.script.evaluate(
expression=f"""console.{type}({value})""",
await_promise=False,
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console.py
index b66057eec00..0105f4dfe31 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console.py
@@ -1,8 +1,8 @@
import pytest
from webdriver.bidi.modules.script import ContextTarget
-from . import assert_console_entry, create_console_api_message_for_primitive_value
-from ... import any_string, int_interval, recursive_compare
+from . import assert_console_entry, create_console_api_message_from_string
+from ... import any_string, int_interval
@pytest.mark.asyncio
@@ -29,7 +29,7 @@ async def test_text_with_argument_variation(
await bidi_session.session.subscribe(events=["log.entryAdded"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, "log", log_argument)
event_data = await on_entry_added
@@ -59,10 +59,10 @@ async def test_level(
if log_method == "assert":
# assert has to be called with a first falsy argument to trigger a log.
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, "assert", "false, 'foo'")
else:
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, log_method, "'foo'")
event_data = await on_entry_added
@@ -105,7 +105,7 @@ async def test_new_context_with_new_window(bidi_session, top_context, wait_for_e
await bidi_session.session.subscribe(events=["log.entryAdded"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, 'log', "'foo'")
event_data = await on_entry_added
assert_console_entry(event_data, text="foo", context=top_context["context"])
@@ -113,7 +113,7 @@ async def test_new_context_with_new_window(bidi_session, top_context, wait_for_e
new_context = await bidi_session.browsing_context.create(type_hint="tab")
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, new_context, 'log', "'foo_in_new_window'")
event_data = await on_entry_added
assert_console_entry(event_data, text="foo_in_new_window", context=new_context["context"])
@@ -124,7 +124,7 @@ async def test_new_context_with_refresh(bidi_session, top_context, wait_for_even
await bidi_session.session.subscribe(events=["log.entryAdded"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, 'log', "'foo'")
event_data = await on_entry_added
assert_console_entry(event_data, text="foo", context=top_context["context"])
@@ -133,7 +133,7 @@ async def test_new_context_with_refresh(bidi_session, top_context, wait_for_even
context=top_context["context"], url=top_context["url"], wait="complete"
)
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, 'log', "'foo_after_refresh'")
event_data = await on_entry_added
assert_console_entry(
@@ -158,13 +158,13 @@ async def test_different_contexts(
await bidi_session.session.subscribe(events=["log.entryAdded"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, "log", "'foo'")
event_data = await on_entry_added
assert_console_entry(event_data, text="foo", context=top_context["context"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, frame_context, "log", "'bar'")
event_data = await on_entry_added
assert_console_entry(event_data, text="bar", context=frame_context["context"])
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console_args.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console_args.py
index 857d9f7b17e..c7c12d160c4 100644
--- a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console_args.py
+++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/console_args.py
@@ -1,10 +1,11 @@
import pytest
-from webdriver.bidi.modules.script import ContextTarget
-from . import assert_console_entry, create_console_api_message_for_primitive_value
+from . import assert_console_entry, create_console_api_message_from_string
+from ... import any_string
+
+pytestmark = pytest.mark.asyncio
-@pytest.mark.asyncio
@pytest.mark.parametrize("data,remote_value", [
("undefined", {"type": "undefined"}),
("null", {"type": "null"}),
@@ -34,7 +35,7 @@ async def test_primitive_types(
await bidi_session.session.subscribe(events=["log.entryAdded"])
on_entry_added = wait_for_event("log.entryAdded")
- await create_console_api_message_for_primitive_value(
+ await create_console_api_message_from_string(
bidi_session, top_context, "log", f"'foo', {data}")
event_data = await on_entry_added
args = [
@@ -46,3 +47,225 @@ async def test_primitive_types(
# First arg is always the first argument as provided to console.log()
assert_console_entry(event_data, args=args)
+
+
+@pytest.mark.parametrize(
+ "data, remote_value",
+ [
+ (
+ "(Symbol('foo'))",
+ {
+ "type": "symbol",
+ },
+ ),
+ (
+ "[1, 'foo', true, new RegExp(/foo/g), [1]]",
+ {
+ "type": "array",
+ "value": [
+ {"type": "number", "value": 1},
+ {"type": "string", "value": "foo"},
+ {"type": "boolean", "value": True},
+ {
+ "type": "regexp",
+ "value": {
+ "pattern": "foo",
+ "flags": "g",
+ },
+ },
+ {"type": "array", "value": [{"type": "number", "value": 1}]},
+ ],
+ },
+ ),
+ (
+ "({'foo': {'bar': 'baz'}, 'qux': 'quux'})",
+ {
+ "type": "object",
+ "value": [
+ ["foo", {"type": "object", "value": [['bar', {"type": "string", "value": "baz"}]]}],
+ ["qux", {"type": "string", "value": "quux"}],
+ ],
+ },
+ ),
+ (
+ "(function(){})",
+ {
+ "type": "function",
+ },
+ ),
+ (
+ "new RegExp(/foo/g)",
+ {
+ "type": "regexp",
+ "value": {
+ "pattern": "foo",
+ "flags": "g",
+ },
+ },
+ ),
+ (
+ "new Date(1654004849000)",
+ {
+ "type": "date",
+ "value": "2022-05-31T13:47:29.000Z",
+ },
+ ),
+ (
+ "new Map([[1, 2], ['foo', 'bar'], [true, false], ['baz', [1]]])",
+ {
+ "type": "map",
+ "value": [
+ [
+ {"type": "number", "value": 1},
+ {"type": "number", "value": 2},
+ ],
+ ["foo", {"type": "string", "value": "bar"}],
+ [
+ {"type": "boolean", "value": True},
+ {"type": "boolean", "value": False},
+ ],
+ [
+ "baz",
+ {"type": "array", "value": [{"type": "number", "value": 1}]},
+ ],
+ ],
+ },
+ ),
+ (
+ "new Set([1, 'foo', true, [1]])",
+ {
+ "type": "set",
+ "value": [
+ {"type": "number", "value": 1},
+ {"type": "string", "value": "foo"},
+ {"type": "boolean", "value": True},
+ {"type": "array", "value": [{"type": "number", "value": 1}]},
+ ],
+ },
+ ),
+ (
+ "new WeakMap()",
+ {
+ "type": "weakmap",
+ },
+ ),
+ (
+ "new WeakSet()",
+ {
+ "type": "weakset",
+ },
+ ),
+ (
+ "new Error('SOME_ERROR_TEXT')",
+ {"type": "error"},
+ ),
+ (
+ "Promise.resolve()",
+ {
+ "type": "promise",
+ },
+ ),
+ (
+ "new Int32Array()",
+ {
+ "type": "typedarray",
+ },
+ ),
+ (
+ "new ArrayBuffer()",
+ {
+ "type": "arraybuffer",
+ },
+ ),
+ (
+ "window",
+ {
+ "type": "window",
+ },
+ ),
+ (
+ "new URL('https://example.com')",
+ {
+ "type": "object",
+ },
+ ),
+ ],
+)
+async def test_remote_values(
+ bidi_session, top_context, wait_for_event, data, remote_value
+):
+ await bidi_session.session.subscribe(events=["log.entryAdded"])
+
+ on_entry_added = wait_for_event("log.entryAdded")
+ await create_console_api_message_from_string(
+ bidi_session, top_context, "log", data
+ )
+ event_data = await on_entry_added
+ arg = {"type": remote_value["type"]}
+ if "value" in remote_value:
+ arg["value"] = remote_value["value"]
+
+ # First arg is always the first argument as provided to console.log()
+ assert_console_entry(event_data, args=[arg])
+
+
+@pytest.mark.parametrize(
+ "data, expected",
+ [
+ (
+ "document.querySelector('br')",
+ [
+ {
+ "type": "node",
+ "sharedId": any_string,
+ "value": {
+ "nodeType": 1,
+ "localName": "br",
+ "namespaceURI": "http://www.w3.org/1999/xhtml",
+ "childNodeCount": 0,
+ "attributes": {},
+ "shadowRoot": None,
+ },
+ },
+ ],
+ ),
+ (
+ "document.querySelector('#custom-element')",
+ [
+ {
+ "type": "node",
+ "sharedId": any_string,
+ "value": {
+ "attributes": {
+ "id": "custom-element",
+ },
+ "childNodeCount": 0,
+ "localName": "custom-element",
+ "namespaceURI": "http://www.w3.org/1999/xhtml",
+ "nodeType": 1,
+ "shadowRoot": {
+ "sharedId": any_string,
+ "type": "node",
+ },
+ },
+ },
+ ],
+ ),
+ ],
+ ids=["basic", "shadowRoot"],
+)
+async def test_node(
+ bidi_session, get_test_page, top_context, wait_for_event, data, expected
+):
+ await bidi_session.browsing_context.navigate(
+ context=top_context["context"], url=get_test_page(), wait="complete"
+ )
+ await bidi_session.session.subscribe(events=["log.entryAdded"])
+
+ on_entry_added = wait_for_event("log.entryAdded")
+ await create_console_api_message_from_string(
+ bidi_session, top_context, "log", data
+ )
+ event_data = await on_entry_added
+
+ assert_console_entry(event_data, args=expected)
diff --git a/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/realm.py b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/realm.py
new file mode 100644
index 00000000000..bcfc2eafec3
--- /dev/null
+++ b/tests/wpt/web-platform-tests/webdriver/tests/bidi/log/entry_added/realm.py
@@ -0,0 +1,32 @@
+import pytest
+from webdriver.bidi.modules.script import ContextTarget
+
+from . import assert_console_entry
+
+pytestmark = pytest.mark.asyncio
+
+
+@pytest.mark.parametrize(
+ "sandbox_name",
+ ["", "sandbox_1"],
+ ids=["default realm", "sandbox"],
+)
+async def test_realm(bidi_session, top_context, wait_for_event, sandbox_name):
+ await bidi_session.session.subscribe(events=["log.entryAdded"])
+
+ on_entry_added = wait_for_event("log.entryAdded")
+ expected_text = "foo"
+ result = await bidi_session.script.evaluate(
+ raw_result=True,
+ expression=f"console.log('{expected_text}')",
+ await_promise=False,
+ target=ContextTarget(top_context["context"], sandbox=sandbox_name),
+ )
+ event_data = await on_entry_added
+
+ assert_console_entry(
+ event_data,
+ text=expected_text,
+ context=top_context["context"],
+ realm=result["realm"],
+ )
diff --git a/tests/wpt/web-platform-tests/webmidi/idlharness.https.window.js b/tests/wpt/web-platform-tests/webmidi/idlharness.https.window.js
index fabc836fdba..8fbd6a903c4 100644
--- a/tests/wpt/web-platform-tests/webmidi/idlharness.https.window.js
+++ b/tests/wpt/web-platform-tests/webmidi/idlharness.https.window.js
@@ -1,5 +1,7 @@
// META: script=/resources/WebIDLParser.js
// META: script=/resources/idlharness.js
+// META: script=/resources/testdriver.js
+// META: script=/resources/testdriver-vendor.js
// META: timeout=long
// https://webaudio.github.io/web-midi-api/
@@ -18,6 +20,8 @@ idl_test(
MIDIConnectionEvent: ['new MIDIConnectionEvent("type")'],
})
+ await test_driver.set_permission({name: 'midi'}, 'granted');
+
self.access = await navigator.requestMIDIAccess();
self.inputs = access.inputs;
self.outputs = access.outputs;
diff --git a/tests/wpt/web-platform-tests/webtransport/streams-echo.https.any.js b/tests/wpt/web-platform-tests/webtransport/streams-echo.https.any.js
index 3b402d00e08..703318d0e70 100644
--- a/tests/wpt/web-platform-tests/webtransport/streams-echo.https.any.js
+++ b/tests/wpt/web-platform-tests/webtransport/streams-echo.https.any.js
@@ -21,7 +21,27 @@ promise_test(async t => {
// Check that the message from the readable end matches the writable end.
assert_equals(reply, 'Hello World');
-}, 'WebTransport server should be able to create and handle a bidirectional stream');
+}, 'WebTransport client should be able to create and handle a bidirectional stream');
+
+promise_test(async t => {
+ // Establish a WebTransport session.
+ const wt = new WebTransport(webtransport_url('echo.py'));
+
+ // Create a bidirectional stream.
+ const bidi_stream = await wt.createBidirectionalStream();
+
+ // Write a message to the writable end, and close it.
+ const writer = bidi_stream.writable.getWriter();
+ const encoder = new TextEncoder();
+ await writer.write(encoder.encode('Hello World'));
+ await writer.close();
+
+ // Read the data on the readable end.
+ const reply = await read_stream_as_string(bidi_stream.readable);
+
+ // Check that the message from the readable end matches the writable end.
+ assert_equals(reply, 'Hello World');
+}, 'WebTransport client should be able to create and handle a bidirectional stream without waiting for ready');
promise_test(async t => {
// Establish a WebTransport session.
@@ -76,7 +96,36 @@ promise_test(async t => {
// Make sure the message on the writable and readable ends of the streams
// match.
assert_equals(reply, 'Hello World');
-}, 'WebTransport server should be able to create, accept, and handle a unidirectional stream');
+}, 'WebTransport client should be able to create, accept, and handle a unidirectional stream');
+
+promise_test(async t => {
+ // Establish a WebTransport session.
+ const wt = new WebTransport(webtransport_url('echo.py'));
+
+ // Create a unidirectional stream.
+ const writable = await wt.createUnidirectionalStream();
+
+ // Write a message to the writable end, and close it.
+ const encoder = new TextEncoderStream();
+ encoder.readable.pipeTo(writable);
+ const writer = encoder.writable.getWriter();
+ await writer.write('Hello World');
+ await writer.close();
+
+ // The echo handler creates a new unidirectional stream to echo back data from
+ // the server to client. Accept the unidirectional stream.
+ const readable = wt.incomingUnidirectionalStreams;
+ const stream_reader = readable.getReader();
+ const { value: recv_stream } = await stream_reader.read();
+ stream_reader.releaseLock();
+
+ // Read the data on the readable end.
+ const reply = await read_stream_as_string(recv_stream);
+
+ // Make sure the message on the writable and readable ends of the streams
+ // match.
+ assert_equals(reply, 'Hello World');
+}, 'WebTransport client should be able to create, accept, and handle a unidirectional stream without waiting for ready');
promise_test(async t => {
// Establish a WebTransport session.